From c0cfa0da56bd8d7a6b91cbe5efd8cb3b722ab39e Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Wed, 7 Sep 2022 14:27:55 +0800 Subject: [PATCH] feat(shell): show introduction is modify --- tools/shell/inc/shellAuto.h | 2 ++ tools/shell/src/shellAuto.c | 6 ++---- tools/shell/src/shellEngine.c | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/shell/inc/shellAuto.h b/tools/shell/inc/shellAuto.h index b2aaee9b6b..2cfab41f26 100644 --- a/tools/shell/inc/shellAuto.h +++ b/tools/shell/inc/shellAuto.h @@ -36,5 +36,7 @@ void shellAutoExit(); // callback autotab module void callbackAutoTab(char* sqlstr, TAOS* pSql, bool usedb); +// introduction +void printfIntroduction(); #endif diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index 67852ec837..f8c93a524a 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -328,8 +328,8 @@ int cntDel = 0; // delete byte count after next press tab // show auto tab introduction void printfIntroduction() { - printf(" ********************* How to Use TAB in TAOS Shell ******************************\n"); - printf(" * Taos shell supports pressing TAB key to complete word. You can try it. *\n"); + printf(" **************************** How to Use TAB Key ********************************\n"); + printf(" * TDengine Command Line supports pressing TAB key to complete word. *\n"); printf(" * Press TAB key anywhere, You'll get surprise. *\n"); printf(" * KEYBOARD SHORTCUT: *\n"); printf(" * [ TAB ] ...... Complete the word or show help if no input *\n"); @@ -583,8 +583,6 @@ bool shellAutoInit() { GenerateVarType(WT_VAR_DATATYPE, data_types, sizeof(data_types) /sizeof(char *)); GenerateVarType(WT_VAR_KEYTAGS, key_tags, sizeof(key_tags) /sizeof(char *)); - printfIntroduction(); - return true; } diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index f07d5e2cc4..3a96bec451 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -1105,6 +1105,7 @@ int32_t shellExecute() { #ifdef WEBSOCKET if (!shell.args.restful && !shell.args.cloud) { #endif + printfIntroduction(); shellGetGrantInfo(); #ifdef WEBSOCKET } -- GitLab