提交 70120168 编写于 作者: sangshuduo's avatar sangshuduo

fix: prompt

上级 bcbf6726
......@@ -81,7 +81,7 @@ typedef struct {
typedef struct {
const char *clientVersion;
char brandName[32];
char cusName[32];
char promptHeader[32];
const char* promptContinue;
const char* osname;
......
......@@ -19,16 +19,16 @@
#include "shellInt.h"
#ifndef OEM_BRAND
char brandName[] = "TDengine";
#ifndef CUS_NAME
char cus_name[] = "TDengine";
#else
char brandName[] = OEM_BRAND;
char cust_name[] = CUS_NAME;
#endif
#ifndef OEM_PROMPT
char brandPrompt[] = "taos";
#ifndef CUS_PROMPT
char cusPrompt[] = "taos";
#else
char brandPrompt[] = OEM_PROMPT;
char cusPrompt[] = CUS_PROMPT;
#endif
#define TAOS_CONSOLE_PROMPT_CONTINUE " -> "
......@@ -402,8 +402,8 @@ int32_t shellParseArgs(int32_t argc, char *argv[]) {
shell.info.clientVersion =
"Welcome to the %s Command Line Interface, Client Version:%s\r\n"
"Copyright (c) 2022 by %s, all rights reserved.\r\n\r\n";
strcpy(shell.info.brandName, brandName);
sprintf(shell.info.promptHeader, "%s> ", brandPrompt);
strcpy(shell.info.cusName, cusName);
sprintf(shell.info.promptHeader, "%s> ", cusPrompt);
shell.info.promptContinue = TAOS_CONSOLE_PROMPT_CONTINUE;
shell.info.promptSize = strlen(shell.info.promptHeader);
snprintf(shell.info.programVersion, sizeof(shell.info.programVersion), "version: %s", version);
......
......@@ -329,7 +329,7 @@ int cntDel = 0; // delete byte count after next press tab
// show auto tab introduction
void printfIntroduction() {
printf(" ****************************** Tab Completion **********************************\n");
printf(" * The %s CLI supports tab completion for a variety of items, *\n", shell.info.brandName);
printf(" * The %s CLI supports tab completion for a variety of items, \n", shell.info.cusName);
printf(" * including database names, table names, function names and keywords. *\n");
printf(" * The full list of shortcut keys is as follows: *\n");
printf(" * [ TAB ] ...... complete the current word *\n");
......@@ -344,7 +344,7 @@ void printfIntroduction() {
}
void showHelp() {
printf("\nThe %s CLI supports the following commands:", shell.info.brandName);
printf("\nThe %s CLI supports the following commands:", shell.info.cusName);
printf(
"\n\
----- A ----- \n\
......
......@@ -1072,8 +1072,8 @@ void *shellThreadLoop(void *arg) {
}
int32_t shellExecute() {
printf(shell.info.clientVersion, shell.info.brandName,
taos_get_client_info(), shell.info.brandName);
printf(shell.info.clientVersion, shell.info.cusName,
taos_get_client_info(), shell.info.cusName);
fflush(stdout);
SShellArgs *pArgs = &shell.args;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册