Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
40936493
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
40936493
编写于
12月 30, 2022
作者:
sangshuduo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: use brand name instead
上级
868cf83c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
11 deletion
+25
-11
tools/shell/inc/shellInt.h
tools/shell/inc/shellInt.h
+3
-2
tools/shell/src/shellArguments.c
tools/shell/src/shellArguments.c
+18
-6
tools/shell/src/shellAuto.c
tools/shell/src/shellAuto.c
+2
-2
tools/shell/src/shellEngine.c
tools/shell/src/shellEngine.c
+2
-1
未找到文件。
tools/shell/inc/shellInt.h
浏览文件 @
40936493
...
@@ -80,8 +80,9 @@ typedef struct {
...
@@ -80,8 +80,9 @@ typedef struct {
}
SShellArgs
;
}
SShellArgs
;
typedef
struct
{
typedef
struct
{
const
char
*
clientVersion
;
const
char
*
clientVersion
;
const
char
*
promptHeader
;
char
brandName
[
32
];
char
promptHeader
[
32
];
const
char
*
promptContinue
;
const
char
*
promptContinue
;
const
char
*
osname
;
const
char
*
osname
;
int32_t
promptSize
;
int32_t
promptSize
;
...
...
tools/shell/src/shellArguments.c
浏览文件 @
40936493
...
@@ -19,7 +19,18 @@
...
@@ -19,7 +19,18 @@
#include "shellInt.h"
#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 TAOS_CONSOLE_PROMPT_CONTINUE " -> "
#define SHELL_HOST "The server FQDN to connect. The default host is localhost."
#define SHELL_HOST "The server FQDN to connect. The default host is localhost."
...
@@ -388,12 +399,13 @@ static int32_t shellCheckArgs() {
...
@@ -388,12 +399,13 @@ static int32_t shellCheckArgs() {
int32_t
shellParseArgs
(
int32_t
argc
,
char
*
argv
[])
{
int32_t
shellParseArgs
(
int32_t
argc
,
char
*
argv
[])
{
shellInitArgs
(
argc
,
argv
);
shellInitArgs
(
argc
,
argv
);
shell
.
info
.
clientVersion
=
shell
.
info
.
clientVersion
=
"Welcome to the TDengine Command Line Interface, Client Version:%s
\r\n
"
"Welcome to the %s Command Line Interface, Client Version:%s
\r\n
"
"Copyright (c) 2022 by TDengine, all rights reserved.
\r\n\r\n
"
;
"Copyright (c) 2022 by %s, all rights reserved.
\r\n\r\n
"
;
shell
.
info
.
promptHeader
=
TAOS_CONSOLE_PROMPT_HEADER
;
strcpy
(
shell
.
info
.
brandName
,
brandName
);
sprintf
(
shell
.
info
.
promptHeader
,
"%s> "
,
brandPrompt
);
shell
.
info
.
promptContinue
=
TAOS_CONSOLE_PROMPT_CONTINUE
;
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
);
snprintf
(
shell
.
info
.
programVersion
,
sizeof
(
shell
.
info
.
programVersion
),
"version: %s"
,
version
);
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)
...
...
tools/shell/src/shellAuto.c
浏览文件 @
40936493
...
@@ -328,7 +328,7 @@ int cntDel = 0; // delete byte count after next press tab
...
@@ -328,7 +328,7 @@ int cntDel = 0; // delete byte count after next press tab
// show auto tab introduction
// show auto tab introduction
void
printfIntroduction
()
{
void
printfIntroduction
()
{
printf
(
" ****************************** Tab Completion **********************************
\n
"
);
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
(
" * including database names, table names, function names and keywords. *
\n
"
);
printf
(
" * The full list of shortcut keys is as follows: *
\n
"
);
printf
(
" * The full list of shortcut keys is as follows: *
\n
"
);
printf
(
" * [ TAB ] ...... complete the current word *
\n
"
);
printf
(
" * [ TAB ] ...... complete the current word *
\n
"
);
...
@@ -343,7 +343,7 @@ void printfIntroduction() {
...
@@ -343,7 +343,7 @@ void printfIntroduction() {
}
}
void
showHelp
()
{
void
showHelp
()
{
printf
(
"
\n
The
TDengine CLI supports the following commands:"
);
printf
(
"
\n
The
%s CLI supports the following commands:"
,
shell
.
info
.
brandName
);
printf
(
printf
(
"
\n
\
"
\n
\
----- A -----
\n
\
----- A -----
\n
\
...
...
tools/shell/src/shellEngine.c
浏览文件 @
40936493
...
@@ -1072,7 +1072,8 @@ void *shellThreadLoop(void *arg) {
...
@@ -1072,7 +1072,8 @@ void *shellThreadLoop(void *arg) {
}
}
int32_t
shellExecute
()
{
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
);
fflush
(
stdout
);
SShellArgs
*
pArgs
=
&
shell
.
args
;
SShellArgs
*
pArgs
=
&
shell
.
args
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录