Browse Source

Repair that the tab key on msh do not work.

马志远 3 năm trước cách đây
mục cha
commit
782c288db6
2 tập tin đã thay đổi với 3 bổ sung5 xóa
  1. 2 2
      components/finsh/cmd.c
  2. 1 3
      components/finsh/msh.c

+ 2 - 2
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 */

+ 1 - 3
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)