4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-30 05:10:26 +08:00

[msh] try to complete module path

Msh can execute module directly. So try to auto-complete the path when
user press TAB. There is a chance that the path is a module.
This commit is contained in:
Grissiom 2014-03-27 15:09:53 +08:00
parent de16b800a4
commit f9659283c0

View File

@ -453,6 +453,15 @@ void msh_auto_complete(char *prefix)
ptr --;
}
#ifdef RT_USING_MODULE
/* There is a chance that the user want to run the module directly. So
* try to complete the file names. If the completed path is not a
* module, the system won't crash anyway. */
if (ptr == prefix)
{
msh_auto_complete_path(ptr);
}
#endif
}
#endif