summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author马志远 <[email protected]>2021-08-25 09:31:35 +0800
committer马志远 <[email protected]>2021-08-25 09:31:35 +0800
commit782c288db624da2c818f693b409aacf1b23dd010 (patch)
treee8db67b37912437e02f3fb99a1721e28d78a1ca5
parent8a1e6c01ac11a6af31d6b124fdd52c576120dd82 (diff)
Repair that the tab key on msh do not work.
-rw-r--r--components/finsh/cmd.c4
-rw-r--r--components/finsh/msh.c4
2 files changed, 3 insertions, 5 deletions
diff --git a/components/finsh/cmd.c b/components/finsh/cmd.c
index ad68c49b35..ee8d4c7d83 100644
--- a/components/finsh/cmd.c
+++ b/components/finsh/cmd.c
@@ -884,7 +884,7 @@ MSH_CMD_EXPORT(list_device, list device in system);
long list(void)
{
- rt_kprintf("--Function List:\n");
+ rt_kprintf("--Commands List:\n");
{
struct finsh_syscall *index;
for (index = _syscall_table_begin;
@@ -904,6 +904,6 @@ long list(void)
return 0;
}
-MSH_CMD_EXPORT(list, list all symbol in system)
+MSH_CMD_EXPORT(list, list all commands in system)
#endif /* RT_USING_FINSH */
diff --git a/components/finsh/msh.c b/components/finsh/msh.c
index 446b25851e..899a6567b1 100644
--- a/components/finsh/msh.c
+++ b/components/finsh/msh.c
@@ -584,9 +584,7 @@ void msh_auto_complete(char *prefix)
for (index = _syscall_table_begin; index < _syscall_table_end; FINSH_NEXT_SYSCALL(index))
{
/* skip finsh shell function */
- if (strncmp(index->name, "__cmd_", 6) != 0) continue;
-
- cmd_name = (const char *) &index->name[6];
+ cmd_name = (const char *) index->name;
if (strncmp(prefix, cmd_name, strlen(prefix)) == 0)
{
if (min_length == 0)