Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c501c812
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c501c812
编写于
2月 11, 2023
作者:
A
Alex Duan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify format and remove no use delete
上级
440122e0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
43 addition
and
41 deletion
+43
-41
tools/shell/src/shellAuto.c
tools/shell/src/shellAuto.c
+43
-41
未找到文件。
tools/shell/src/shellAuto.c
浏览文件 @
c501c812
...
...
@@ -60,23 +60,23 @@ SWords shellCommands[] = {
{
"alter database <db_name> <alter_db_options> <anyword> <alter_db_options> <anyword> <alter_db_options> <anyword> "
"<alter_db_options> <anyword> <alter_db_options> <anyword> ;"
,
0
,
0
,
NULL
},
{
"alter dnode <dnode_id>
balance
"
,
0
,
0
,
NULL
},
{
"alter dnode <dnode_id>
resetlog
;"
,
0
,
0
,
NULL
},
{
"alter dnode <dnode_id>
debugFlag 141
;"
,
0
,
0
,
NULL
},
{
"alter dnode <dnode_id>
monitor 1
;"
,
0
,
0
,
NULL
},
{
"alter all dnodes
monitor
"
,
0
,
0
,
NULL
},
{
"alter all
dnodes balance
"
,
0
,
0
,
NULL
},
{
"alter all
dnodes resetlog
;"
,
0
,
0
,
NULL
},
{
"alter all
dnodes debugFlag 141
;"
,
0
,
0
,
NULL
},
{
"alter all
dnodes monitor 1
;"
,
0
,
0
,
NULL
},
{
"alter dnode <dnode_id>
\"
resetlog
\"
;
"
,
0
,
0
,
NULL
},
{
"alter dnode <dnode_id>
\"
debugFlag
\"
\"
141
\"
;"
,
0
,
0
,
NULL
},
{
"alter dnode <dnode_id>
\"
monitor
\"
\"
0
\"
;"
,
0
,
0
,
NULL
},
{
"alter dnode <dnode_id>
\"
monitor
\"
\"
1
\"
;"
,
0
,
0
,
NULL
},
{
"alter all dnodes
\"
monitor
\"
"
,
0
,
0
,
NULL
},
{
"alter all
dnodes
\"
balance
\"
"
,
0
,
0
,
NULL
},
{
"alter all
dnodes
\"
resetlog
\"
;"
,
0
,
0
,
NULL
},
{
"alter all
dnodes
\"
debugFlag
\"
\"
141
\"
;"
,
0
,
0
,
NULL
},
{
"alter all
dnodes
\"
monitor
\"
\"
1
\"
;"
,
0
,
0
,
NULL
},
{
"alter table <tb_name> <tb_actions> <anyword> ;"
,
0
,
0
,
NULL
},
{
"alter table modify column"
,
0
,
0
,
NULL
},
{
"alter local
resetlog
;"
,
0
,
0
,
NULL
},
{
"alter local
DebugFlag 143
;"
,
0
,
0
,
NULL
},
{
"alter local
cDebugFlag 143
;"
,
0
,
0
,
NULL
},
{
"alter local
uDebugFlag 143
;"
,
0
,
0
,
NULL
},
{
"alter local
rpcDebugFlag 143
;"
,
0
,
0
,
NULL
},
{
"alter local
tmrDebugFlag 143
;"
,
0
,
0
,
NULL
},
{
"alter local
\"
resetlog
\"
;"
,
0
,
0
,
NULL
},
{
"alter local
\"
DebugFlag
\"
\"
143
\"
;"
,
0
,
0
,
NULL
},
{
"alter local
\"
cDebugFlag
\"
\"
143
\"
;"
,
0
,
0
,
NULL
},
{
"alter local
\"
uDebugFlag
\"
\"
143
\"
;"
,
0
,
0
,
NULL
},
{
"alter local
\"
rpcDebugFlag
\"
\"
143
\"
;"
,
0
,
0
,
NULL
},
{
"alter local
\"
tmrDebugFlag
\"
\"
143
\"
;"
,
0
,
0
,
NULL
},
{
"alter topic"
,
0
,
0
,
NULL
},
{
"alter user <user_name> <user_actions> <anyword> ;"
,
0
,
0
,
NULL
},
// 20
...
...
@@ -108,6 +108,7 @@ SWords shellCommands[] = {
{
"drop topic <topic_name> ;"
,
0
,
0
,
NULL
},
{
"drop stream <stream_name> ;"
,
0
,
0
,
NULL
},
{
"explain select"
,
0
,
0
,
NULL
},
// 44 append sub sql
{
"flush database <db_name> ;"
,
0
,
0
,
NULL
},
{
"help;"
,
0
,
0
,
NULL
},
{
"grant all on <anyword> to <user_name> ;"
,
0
,
0
,
NULL
},
{
"grant read on <anyword> to <user_name> ;"
,
0
,
0
,
NULL
},
...
...
@@ -121,7 +122,6 @@ SWords shellCommands[] = {
{
"revoke read on <anyword> from <user_name> ;"
,
0
,
0
,
NULL
},
{
"revoke write on <anyword> from <user_name> ;"
,
0
,
0
,
NULL
},
{
"select * from <all_table>"
,
0
,
0
,
NULL
},
{
"select _block_dist() from <all_table>
\\
G;"
,
0
,
0
,
NULL
},
{
"select client_version();"
,
0
,
0
,
NULL
},
// 60
{
"select current_user();"
,
0
,
0
,
NULL
},
...
...
@@ -247,7 +247,7 @@ char* db_options[] = {"keep ",
"wal_retention_size "
,
"wal_segment_size "
};
char
*
alter_db_options
[]
=
{
"
keep "
,
"cachemodel "
,
"cachesize "
,
"wal_fsync_period "
,
"wal_level "
};
char
*
alter_db_options
[]
=
{
"
cachemodel "
,
"replica "
,
"keep "
,
"cachesize "
,
"wal_fsync_period "
,
"wal_level "
};
char
*
data_types
[]
=
{
"timestamp"
,
"int"
,
"int unsigned"
,
"varchar(16)"
,
...
...
@@ -327,19 +327,19 @@ 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
(
"
* 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
"
);
printf
(
"
* ...... if used on a blank line, display all valid commands
*
\n
"
);
printf
(
"
* [ Ctrl + A ] ...... move cursor to the st[A]rt of the line
*
\n
"
);
printf
(
"
* [ Ctrl + E ] ...... move cursor to the [E]nd of the line
*
\n
"
);
printf
(
"
* [ Ctrl + W ] ...... move cursor to the middle of the line
*
\n
"
);
printf
(
"
* [ Ctrl + L ] ...... clear the entire screen
*
\n
"
);
printf
(
"
* [ Ctrl + K ] ...... clear the screen after the cursor
*
\n
"
);
printf
(
"
* [ Ctrl + U ] ...... clear the screen before the cursor
*
\n
"
);
printf
(
"
**********************************************************************************
\n\n
"
);
printf
(
"
****************************** Tab Completion ***
**********************************
\n
"
);
printf
(
"
* The TDengine CLI supports tab completion for a variety of items,
*
\n
"
);
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
"
);
printf
(
"
* ...... if used on a blank line, display all supported commands
*
\n
"
);
printf
(
"
* [ Ctrl + A ] ...... move cursor to the st[A]rt of the line
*
\n
"
);
printf
(
"
* [ Ctrl + E ] ...... move cursor to the [E]nd of the line
*
\n
"
);
printf
(
"
* [ Ctrl + W ] ...... move cursor to the middle of the line
*
\n
"
);
printf
(
"
* [ Ctrl + L ] ...... clear the entire screen
*
\n
"
);
printf
(
"
* [ Ctrl + K ] ...... clear the screen after the cursor
*
\n
"
);
printf
(
"
* [ Ctrl + U ] ...... clear the screen before the cursor
*
\n
"
);
printf
(
"
***
**********************************************************************************
\n\n
"
);
}
void
showHelp
()
{
...
...
@@ -348,23 +348,24 @@ void showHelp() {
"
\n
\
----- A -----
\n
\
alter database <db_name> <db_options>
\n
\
alter dnode <dnode_id> balance
\n
\
alter dnode <dnode_id> resetlog;
\n
\
alter all dnodes monitor
\n
\
alter alldnodes balance
\n
\
alter alldnodes resetlog;
\n
\
alter alldnodes debugFlag
\n
\
alter alldnodes monitor
\n
\
alter dnode <dnode_id>
\"
resetlog
\"
;
\n
\
alter dnode <dnode_id>
\"
monitor
\"
\"
0
\"
;
\n
\
alter dnode <dnode_id>
\"
monitor
\"
\"
1
\"
;
\n
\
alter dnode <dnode_id>
\"
debugflag
\"
\"
143
\"
;
\n
\
alter all dnodes
\"
monitor
\"
\"
0
\"
;
\n
\
alter all dnodes
\"
monitor
\"
\"
1
\"
;
\n
\
alter all dnodes
\"
resetlog
\"
;
\n
\
alter all dnodes
\"
debugFlag
\"
\n
\
alter table <tb_name> <tb_actions> ;
\n
\
alter table modify column
\n
\
alter local
resetlog
;
\n
\
alter local
DebugFlag 143
;
\n
\
alter local
\"
resetlog
\"
;
\n
\
alter local
\"
DebugFlag
\"
\"
143
\"
;
\n
\
alter topic
\n
\
alter user <user_name> <user_actions> ...
\n
\
----- C -----
\n
\
create table <tb_name> using <stb_name> tags ...
\n
\
create database <db_name> <db_options> ...
\n
\
create dnode
...
\
n
\
create dnode
\"
fqdn:port
\"
n\
create index ...
\n
\
create mnode on dnode <dnode_id> ;
\n
\
create qnode on dnode <dnode_id> ;
\n
\
...
...
@@ -387,6 +388,8 @@ void showHelp() {
drop stream <stream_name> ;
\n
\
----- E -----
\n
\
explain select clause ...
\n
\
----- F -----
\n
\
flush database <db_name>;
----- H -----
\n
\
help;
\n
\
----- I -----
\n
\
...
...
@@ -409,7 +412,6 @@ void showHelp() {
revoke write on <priv_level> from <user_name> ;
\n
\
----- S -----
\n
\
select * from <all_table> where ...
\n
\
select _block_dist() from <all_table>;
\n
\
select client_version();
\n
\
select current_user();
\n
\
select database();
\n
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录