mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 11:23:07 +08:00
nshlib: Rename 'sh' command to 'source' command
since this command change the parent environment variable and add new '.' command which has the same functionality as 'source' Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -85,6 +85,12 @@ static int cmd_unrecognized(FAR struct nsh_vtbl_s *vtbl, int argc,
|
||||
|
||||
static const struct cmdmap_s g_cmdmap[] =
|
||||
{
|
||||
#if CONFIG_NFILE_STREAMS > 0 && !defined(CONFIG_NSH_DISABLESCRIPT)
|
||||
# ifndef CONFIG_NSH_DISABLE_SOURCE
|
||||
{ ".", cmd_source, 2, 2, "<script-path>" },
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_NSH_DISABLESCRIPT) && !defined(CONFIG_NSH_DISABLE_TEST)
|
||||
{ "[", cmd_lbracket, 4, CONFIG_NSH_MAXARGUMENTS, "<expression> ]" },
|
||||
#endif
|
||||
@@ -478,12 +484,6 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||
#endif
|
||||
#endif /* CONFIG_NSH_DISABLE_SET */
|
||||
|
||||
#if CONFIG_NFILE_STREAMS > 0 && !defined(CONFIG_NSH_DISABLESCRIPT)
|
||||
# ifndef CONFIG_NSH_DISABLE_SH
|
||||
{ "sh", cmd_sh, 2, 2, "<script-path>" },
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NSH_DISABLE_SHUTDOWN
|
||||
#if defined(CONFIG_BOARDCTL_POWEROFF) && defined(CONFIG_BOARDCTL_RESET)
|
||||
{ "shutdown", cmd_shutdown, 1, 2, "[--reboot]" },
|
||||
@@ -498,6 +498,12 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||
{ "sleep", cmd_sleep, 2, 2, "<sec>" },
|
||||
#endif
|
||||
|
||||
#if CONFIG_NFILE_STREAMS > 0 && !defined(CONFIG_NSH_DISABLESCRIPT)
|
||||
# ifndef CONFIG_NSH_DISABLE_SOURCE
|
||||
{ "source", cmd_source, 2, 2, "<script-path>" },
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_NSH_DISABLESCRIPT) && !defined(CONFIG_NSH_DISABLE_TEST)
|
||||
{ "test", cmd_test, 3, CONFIG_NSH_MAXARGUMENTS, "<expression>" },
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user