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)