mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 11:23:07 +08:00
bug fix:: Never reach readline_prompt() in nsh_initialize, moved it up to the top. Works now.
enhancement: TAB completion now works like Unix, it will autocomplete as much as possible for multiple matches.
This commit is contained in:
@@ -101,6 +101,18 @@ static const struct extmatch_vtable_s g_nsh_extmatch =
|
||||
|
||||
void nsh_initialize(void)
|
||||
{
|
||||
#if defined(CONFIG_NSH_READLINE) && defined(CONFIG_READLINE_TABCOMPLETION)
|
||||
/* Configure the NSH prompt */
|
||||
|
||||
(void)readline_prompt(g_nshprompt);
|
||||
|
||||
#ifdef CONFIG_READLINE_HAVE_EXTMATCH
|
||||
/* Set up for tab completion on NSH commands */
|
||||
|
||||
(void)readline_extmatch(&g_nsh_extmatch);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Mount the /etc filesystem */
|
||||
|
||||
(void)nsh_romfsetc();
|
||||
@@ -114,16 +126,4 @@ void nsh_initialize(void)
|
||||
/* Bring up the network */
|
||||
|
||||
(void)nsh_netinit();
|
||||
|
||||
#if defined(CONFIG_NSH_READLINE) && defined(CONFIG_READLINE_TABCOMPLETION)
|
||||
/* Configure the NSH prompt */
|
||||
|
||||
(void)readline_prompt(g_nshprompt);
|
||||
|
||||
#ifdef CONFIG_READLINE_HAVE_EXTMATCH
|
||||
/* Set up for tab completion on NSH commands */
|
||||
|
||||
(void)readline_extmatch(&g_nsh_extmatch);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user