This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch NLPCRAFT-346
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-346 by this push:
     new 6a5e32a  WIP.
6a5e32a is described below

commit 6a5e32aece7bd0f83798328819b5ac4d9a0a1c51
Author: Aaron Radzinzski <[email protected]>
AuthorDate: Wed Jun 30 15:46:21 2021 -0700

    WIP.
---
 .../main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala | 2 +-
 .../org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala    | 4 ++--
 .../nlpcraft/model/tools/cmdline/NCCliFileNameCompleter.java       | 7 ++++---
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
index 9e726c8..ff6d181 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
@@ -2350,7 +2350,7 @@ object NCCli extends NCCliBase {
                 }
                 else if (words.size > 1 && isFsPath(words.head, words.last))
                     splitEqParam(words.last) match {
-                        case Some((_, path)) => 
fsCompleter.fillCandidates(reader, path, candidates)
+                        case Some((name, path)) => 
fsCompleter.fillCandidates(reader, name, path, candidates)
                         case None => ()
                     }
                 else {
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
index 0ab0689..cc39426 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
@@ -671,7 +671,7 @@ private [cmdline] object NCCliCommands {
                         s"configuration file in ${y("'resources'")} folder or 
on the classpath. If the configuration file has " +
                         s"different name or in different location use this 
parameter to provide an alternative path. " +
                         s"Note that the server and the probe can use the same 
file for their configuration. " +
-                        s"Note also that you can use ${y("'~'")} at the 
beginning of the path to specify user home directory."
+                        s"Note also that you can use ${y("'~'")} at the 
beginning of the path to indicate user home directory."
                 ),
                 Parameter(
                     id = "igniteConfig",
@@ -685,7 +685,7 @@ private [cmdline] object NCCliCommands {
                         s"${y("'ignite.xml'")} configuration file in the same 
directory as NLPCraft JAR file. If the " +
                         s"configuration file has different name or in 
different location use this parameter to " +
                         s"provide an alternative path. " +
-                        s"Note also that you can use ${y("'~'")} at the 
beginning of the path to specify user home directory."
+                        s"Note also that you can use ${y("'~'")} at the 
beginning of the path to indicate user home directory."
                 ),
                 Parameter(
                     id = "jvmopts",
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliFileNameCompleter.java
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliFileNameCompleter.java
index 1f07763..a105041 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliFileNameCompleter.java
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliFileNameCompleter.java
@@ -38,10 +38,11 @@ class NCCliFileNameCompleter
     /**
      *
      * @param reader Line reader for JLine.
+     * @param paramName Name of the parameter.
      * @param pathBuf Current path string.
      * @param candidates List of completion candidates to fill.
      */
-    void fillCandidates(LineReader reader, String pathBuf, final 
List<Candidate> candidates) {
+    void fillCandidates(LineReader reader, String paramName, String pathBuf, 
final List<Candidate> candidates) {
         Path curPath;
         String curBuf;
 
@@ -74,7 +75,7 @@ class NCCliFileNameCompleter
                     if (Files.isDirectory(path)) {
                         candidates.add(
                             new Candidate(
-                                value + 
(reader.isSet(LineReader.Option.AUTO_PARAM_SLASH) ? sep : ""),
+                                paramName + "=" + value + 
(reader.isSet(LineReader.Option.AUTO_PARAM_SLASH) ? sep : ""),
                                 getDisplay(reader.getTerminal(), path, 
resolver, sep),
                                 null,
                                 null,
@@ -86,7 +87,7 @@ class NCCliFileNameCompleter
                     } else {
                         candidates.add(
                             new Candidate(
-                                value,
+                                paramName + "=" + value,
                                 getDisplay(reader.getTerminal(), path, 
resolver, sep),
                                 null,
                                 null,

Reply via email to