chore: use brand name instead
This commit is contained in:
parent
868cf83cdb
commit
4093649309
|
@ -81,7 +81,8 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
const char *clientVersion;
|
||||
const char* promptHeader;
|
||||
char brandName[32];
|
||||
char promptHeader[32];
|
||||
const char* promptContinue;
|
||||
const char* osname;
|
||||
int32_t promptSize;
|
||||
|
|
|
@ -19,7 +19,18 @@
|
|||
|
||||
#include "shellInt.h"
|
||||
|
||||
#define TAOS_CONSOLE_PROMPT_HEADER "taos> "
|
||||
#ifndef OEM_BRAND
|
||||
char brandName[] = "TDengine";
|
||||
#else
|
||||
char brandName[] = OEM_BRAND;
|
||||
#endif
|
||||
|
||||
#ifndef OEM_PROMPT
|
||||
char brandPrompt[] = "taos";
|
||||
#else
|
||||
char brandPrompt[] = OEM_PROMPT;
|
||||
#endif
|
||||
|
||||
#define TAOS_CONSOLE_PROMPT_CONTINUE " -> "
|
||||
|
||||
#define SHELL_HOST "The server FQDN to connect. The default host is localhost."
|
||||
|
@ -389,11 +400,12 @@ static int32_t shellCheckArgs() {
|
|||
int32_t shellParseArgs(int32_t argc, char *argv[]) {
|
||||
shellInitArgs(argc, argv);
|
||||
shell.info.clientVersion =
|
||||
"Welcome to the TDengine Command Line Interface, Client Version:%s\r\n"
|
||||
"Copyright (c) 2022 by TDengine, all rights reserved.\r\n\r\n";
|
||||
shell.info.promptHeader = TAOS_CONSOLE_PROMPT_HEADER;
|
||||
"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);
|
||||
shell.info.promptContinue = TAOS_CONSOLE_PROMPT_CONTINUE;
|
||||
shell.info.promptSize = 6;
|
||||
shell.info.promptSize = strlen(shell.info.promptHeader);
|
||||
snprintf(shell.info.programVersion, sizeof(shell.info.programVersion), "version: %s", version);
|
||||
|
||||
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)
|
||||
|
|
|
@ -328,7 +328,7 @@ int cntDel = 0; // delete byte count after next press tab
|
|||
// show auto tab introduction
|
||||
void printfIntroduction() {
|
||||
printf(" ****************************** Tab Completion **********************************\n");
|
||||
printf(" * The TDengine CLI supports tab completion for a variety of items, *\n");
|
||||
printf(" * The %s CLI supports tab completion for a variety of items, *\n", shell.info.brandName);
|
||||
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");
|
||||
|
@ -343,7 +343,7 @@ void printfIntroduction() {
|
|||
}
|
||||
|
||||
void showHelp() {
|
||||
printf("\nThe TDengine CLI supports the following commands:");
|
||||
printf("\nThe %s CLI supports the following commands:", shell.info.brandName);
|
||||
printf(
|
||||
"\n\
|
||||
----- A ----- \n\
|
||||
|
|
|
@ -1072,7 +1072,8 @@ void *shellThreadLoop(void *arg) {
|
|||
}
|
||||
|
||||
int32_t shellExecute() {
|
||||
printf(shell.info.clientVersion, taos_get_client_info());
|
||||
printf(shell.info.clientVersion, shell.info.brandName,
|
||||
taos_get_client_info(), shell.info.brandName);
|
||||
fflush(stdout);
|
||||
|
||||
SShellArgs *pArgs = &shell.args;
|
||||
|
|
Loading…
Reference in New Issue