Skip to content

Commit 782c288

Browse files
committed
Repair that the tab key on msh do not work.
1 parent 8a1e6c0 commit 782c288

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

components/finsh/cmd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ MSH_CMD_EXPORT(list_device, list device in system);
884884

885885
long list(void)
886886
{
887-
rt_kprintf("--Function List:\n");
887+
rt_kprintf("--Commands List:\n");
888888
{
889889
struct finsh_syscall *index;
890890
for (index = _syscall_table_begin;
@@ -904,6 +904,6 @@ long list(void)
904904

905905
return 0;
906906
}
907-
MSH_CMD_EXPORT(list, list all symbol in system)
907+
MSH_CMD_EXPORT(list, list all commands in system)
908908

909909
#endif /* RT_USING_FINSH */

components/finsh/msh.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,9 +584,7 @@ void msh_auto_complete(char *prefix)
584584
for (index = _syscall_table_begin; index < _syscall_table_end; FINSH_NEXT_SYSCALL(index))
585585
{
586586
/* skip finsh shell function */
587-
if (strncmp(index->name, "__cmd_", 6) != 0) continue;
588-
589-
cmd_name = (const char *) &index->name[6];
587+
cmd_name = (const char *) index->name;
590588
if (strncmp(prefix, cmd_name, strlen(prefix)) == 0)
591589
{
592590
if (min_length == 0)

0 commit comments

Comments
 (0)