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

critas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 242db7672c7 Update Cli -help information (#15159)
242db7672c7 is described below

commit 242db7672c7f14c7dd21bdde9e32da01396c57a8
Author: Summer <[email protected]>
AuthorDate: Tue Mar 25 18:42:51 2025 +0800

    Update Cli -help information (#15159)
    
    * Update the Cli help information
    
    * update --help info
    
    ---------
    
    Co-authored-by: 2b3c511 <[email protected]>
---
 .../cli/src/assembly/resources/sbin/start-cli.sh   |  4 ---
 .../java/org/apache/iotdb/cli/AbstractCli.java     | 33 ++++++++++++----------
 2 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/iotdb-client/cli/src/assembly/resources/sbin/start-cli.sh 
b/iotdb-client/cli/src/assembly/resources/sbin/start-cli.sh
index 1bb6a64375d..a5ee21a2799 100755
--- a/iotdb-client/cli/src/assembly/resources/sbin/start-cli.sh
+++ b/iotdb-client/cli/src/assembly/resources/sbin/start-cli.sh
@@ -92,10 +92,6 @@ while true; do
             sql_dialect_param="-sql_dialect $2"
             shift 2
         ;;
-        --help)
-            echo "Usage: $0 [-h <ip>] [-p <port>] [-u <username>] [-pw 
<password>] [-D <name=value>] [-c] [-e sql]"
-            exit 0
-        ;;
         "")
               #if we do not use getopt, we then have to process the case that 
there is no argument.
               #in some systems, when there is no argument, shift command may 
throw error, so we skip directly
diff --git 
a/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java 
b/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java
index 2bd92be02b9..b83f205ee33 100644
--- a/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java
+++ b/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java
@@ -163,11 +163,12 @@ public abstract class AbstractCli {
 
   static Options createOptions() {
     Options options = new Options();
-    Option help = new Option(HELP_ARGS, false, "Display help 
information(optional)");
+    Option help = new Option(HELP_ARGS, false, "Display help information. 
(optional)");
     help.setRequired(false);
     options.addOption(help);
 
-    Option timeFormat = new Option(ISO8601_ARGS, false, "Display timestamp in 
number(optional)");
+    Option timeFormat =
+        new Option(ISO8601_ARGS, false, "Display timestamp in numeric format. 
(optional)");
     timeFormat.setRequired(false);
     options.addOption(timeFormat);
 
@@ -175,7 +176,7 @@ public abstract class AbstractCli {
         Option.builder(HOST_ARGS)
             .argName(HOST_NAME)
             .hasArg()
-            .desc("Host Name (optional, default 127.0.0.1)")
+            .desc("Host Name. Default is 127.0.0.1. (optional)")
             .build();
     options.addOption(host);
 
@@ -183,7 +184,7 @@ public abstract class AbstractCli {
         Option.builder(PORT_ARGS)
             .argName(PORT_NAME)
             .hasArg()
-            .desc("Port (optional, default 6667)")
+            .desc("Port. Default is 6667. (optional)")
             .build();
     options.addOption(port);
 
@@ -191,20 +192,24 @@ public abstract class AbstractCli {
         Option.builder(USERNAME_ARGS)
             .argName(USERNAME_NAME)
             .hasArg()
-            .desc("User name (required)")
+            .desc("User name. (required)")
             .required()
             .build();
     options.addOption(username);
 
     Option password =
-        Option.builder(PW_ARGS).argName(PW_NAME).hasArg().desc("password 
(optional)").build();
+        Option.builder(PW_ARGS)
+            .argName(PW_NAME)
+            .hasArg()
+            .desc("Password. Default is root. (optional)")
+            .build();
     options.addOption(password);
 
     Option useSSL =
         Option.builder(USE_SSL_ARGS)
             .argName(USE_SSL)
             .hasArg()
-            .desc("use_ssl statement (optional)")
+            .desc("Use SSL statement. (optional)")
             .build();
     options.addOption(useSSL);
 
@@ -212,7 +217,7 @@ public abstract class AbstractCli {
         Option.builder(TRUST_STORE_ARGS)
             .argName(TRUST_STORE)
             .hasArg()
-            .desc("trust_store statement (optional)")
+            .desc("Trust store statement. (optional)")
             .build();
     options.addOption(trustStore);
 
@@ -220,7 +225,7 @@ public abstract class AbstractCli {
         Option.builder(TRUST_STORE_PWD_ARGS)
             .argName(TRUST_STORE_PWD)
             .hasArg()
-            .desc("trust_store_pwd statement (optional)")
+            .desc("Trust store password statement. (optional)")
             .build();
     options.addOption(trustStorePwd);
 
@@ -228,14 +233,14 @@ public abstract class AbstractCli {
         Option.builder(EXECUTE_ARGS)
             .argName(EXECUTE_NAME)
             .hasArg()
-            .desc("execute statement (optional)")
+            .desc("Execute a statement. (optional)")
             .build();
     options.addOption(execute);
 
     Option isRpcCompressed =
         Option.builder(RPC_COMPRESS_ARGS)
             .argName(RPC_COMPRESS_NAME)
-            .desc("Rpc Compression enabled or not")
+            .desc("Enable or disable Rpc Compression. (optional)")
             .build();
     options.addOption(isRpcCompressed);
 
@@ -243,9 +248,7 @@ public abstract class AbstractCli {
         Option.builder(TIMEOUT_ARGS)
             .argName(TIMEOUT_NAME)
             .hasArg()
-            .desc(
-                "The timeout in second. "
-                    + "Using the configuration of server if it's not set 
(optional)")
+            .desc("The timeout in seconds. Uses the server configuration if 
not set. (optional)")
             .build();
     options.addOption(queryTimeout);
 
@@ -253,7 +256,7 @@ public abstract class AbstractCli {
         Option.builder(SQL_DIALECT)
             .argName(SQL_DIALECT)
             .hasArg()
-            .desc("currently support tree and table, using tree if it's not 
set (optional)")
+            .desc("Currently supports tree and table; uses tree if not set. 
(optional)")
             .build();
     options.addOption(sqlDialect);
     return options;

Reply via email to