diff --git a/nshlib/Kconfig b/nshlib/Kconfig index 2365f5918..404b40f44 100644 --- a/nshlib/Kconfig +++ b/nshlib/Kconfig @@ -18,6 +18,12 @@ config NSH_LIBRARY if NSH_LIBRARY +config NSH_PROMPT_STRING + string "Prompt String" + default "nsh> " + ---help--- + Provide the shell prompt string, default is "nsh> ". + menuconfig NSH_MOTD bool "Message of the Day (MOTD)" default n @@ -139,10 +145,10 @@ config NSH_CMDPARMS config NSH_MAXARGUMENTS int "Maximum number of command arguments" - default 6 + default 7 ---help--- The maximum number of NSH command arguments. - Default: 6 + Default: 7 config NSH_ARGCAT bool "Concatenation of argument strings" diff --git a/nshlib/nsh.h b/nshlib/nsh.h index 187cc5696..ec4f2e3e6 100644 --- a/nshlib/nsh.h +++ b/nshlib/nsh.h @@ -464,7 +464,7 @@ /* This is the maximum number of arguments that will be accepted for a * command. Here we attempt to select the smallest number possible depending - * upon the of commands that are available. Most commands use six or fewer + * upon the of commands that are available. Most commands use seven or fewer * arguments, but there are a few that require more. * * This value is also configurable with CONFIG_NSH_MAXARGUMENTS. This @@ -472,10 +472,6 @@ * commands that require more commands than NSH is aware of. */ -#ifndef CONFIG_NSH_MAXARGUMENTS -# define CONFIG_NSH_MAXARGUMENTS 6 -#endif - #if CONFIG_NSH_MAXARGUMENTS < 11 # if defined(CONFIG_NET) && !defined(CONFIG_NSH_DISABLE_IFCONFIG) # undef CONFIG_NSH_MAXARGUMENTS @@ -483,15 +479,6 @@ # endif #endif -#if CONFIG_NSH_MAXARGUMENTS < 7 -# if defined(CONFIG_NET_UDP) && CONFIG_NFILE_DESCRIPTORS > 0 -# if !defined(CONFIG_NSH_DISABLE_GET) || !defined(CONFIG_NSH_DISABLE_PUT) -# undef CONFIG_NSH_MAXARGUMENTS -# define CONFIG_NSH_MAXARGUMENTS 7 -# endif -# endif -#endif - /* Argument list size * * argv[0]: The command name. diff --git a/nshlib/nsh_parse.c b/nshlib/nsh_parse.c index 6888aed8c..b51fc2b4a 100644 --- a/nshlib/nsh_parse.c +++ b/nshlib/nsh_parse.c @@ -259,7 +259,7 @@ const char g_loginfailure[] = "Login failed!\n"; /* The NSH prompt */ -const char g_nshprompt[] = "nsh> "; +const char g_nshprompt[] = CONFIG_NSH_PROMPT_STRING; /* Common, message formats */