aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2014-09-08 16:52:39 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2014-09-08 16:52:39 +0200
commit2ec34969e73c5262e20d3b4599196ff03913e66e (patch)
tree78d02e9405ae39a16a5f010e167103a8e3acca75 /shell
parent3e9b13e4c572d97468bef029f9c6e72271297fcb (diff)
downloadbusybox-w32-2ec34969e73c5262e20d3b4599196ff03913e66e.tar.gz
busybox-w32-2ec34969e73c5262e20d3b4599196ff03913e66e.tar.bz2
busybox-w32-2ec34969e73c5262e20d3b4599196ff03913e66e.zip
ash: factor out ASH_HELP config option
It used to be aliased to !FEATURE_SH_EXTRA_QUIET for ash, while hush had it separate from FEATURE_SH_EXTRA_QUIET. Bring ash in line with hush. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 4ead6f990..293f15147 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -143,6 +143,13 @@
143//config: help 143//config: help
144//config: Enable support for test builtin in ash. 144//config: Enable support for test builtin in ash.
145//config: 145//config:
146//config:config ASH_HELP
147//config: bool "help builtin"
148//config: default y
149//config: depends on ASH
150//config: help
151//config: Enable help builtin in ash.
152//config:
146//config:config ASH_CMDCMD 153//config:config ASH_CMDCMD
147//config: bool "'command' command to override shell builtins" 154//config: bool "'command' command to override shell builtins"
148//config: default y 155//config: default y
@@ -8804,8 +8811,8 @@ setinteractive(int on)
8804 if (!did_banner) { 8811 if (!did_banner) {
8805 /* note: ash and hush share this string */ 8812 /* note: ash and hush share this string */
8806 out1fmt("\n\n%s %s\n" 8813 out1fmt("\n\n%s %s\n"
8807 "Enter 'help' for a list of built-in commands." 8814 IF_ASH_HELP("Enter 'help' for a list of built-in commands.\n")
8808 "\n\n", 8815 "\n",
8809 bb_banner, 8816 bb_banner,
8810 "built-in shell (ash)" 8817 "built-in shell (ash)"
8811 ); 8818 );
@@ -9058,7 +9065,7 @@ static int exportcmd(int, char **) FAST_FUNC;
9058#if ENABLE_ASH_GETOPTS 9065#if ENABLE_ASH_GETOPTS
9059static int getoptscmd(int, char **) FAST_FUNC; 9066static int getoptscmd(int, char **) FAST_FUNC;
9060#endif 9067#endif
9061#if !ENABLE_FEATURE_SH_EXTRA_QUIET 9068#if ENABLE_ASH_HELP
9062static int helpcmd(int, char **) FAST_FUNC; 9069static int helpcmd(int, char **) FAST_FUNC;
9063#endif 9070#endif
9064#if MAX_HISTORY 9071#if MAX_HISTORY
@@ -9134,7 +9141,7 @@ static const struct builtincmd builtintab[] = {
9134 { BUILTIN_REGULAR "getopts" , getoptscmd }, 9141 { BUILTIN_REGULAR "getopts" , getoptscmd },
9135#endif 9142#endif
9136 { BUILTIN_NOSPEC "hash" , hashcmd }, 9143 { BUILTIN_NOSPEC "hash" , hashcmd },
9137#if !ENABLE_FEATURE_SH_EXTRA_QUIET 9144#if ENABLE_ASH_HELP
9138 { BUILTIN_NOSPEC "help" , helpcmd }, 9145 { BUILTIN_NOSPEC "help" , helpcmd },
9139#endif 9146#endif
9140#if MAX_HISTORY 9147#if MAX_HISTORY
@@ -12611,10 +12618,7 @@ trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
12611 12618
12612/* ============ Builtins */ 12619/* ============ Builtins */
12613 12620
12614#if !ENABLE_FEATURE_SH_EXTRA_QUIET 12621#if ENABLE_ASH_HELP
12615/*
12616 * Lists available builtins
12617 */
12618static int FAST_FUNC 12622static int FAST_FUNC
12619helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) 12623helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
12620{ 12624{
@@ -12632,7 +12636,7 @@ helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
12632 col = 0; 12636 col = 0;
12633 } 12637 }
12634 } 12638 }
12635#if ENABLE_FEATURE_SH_STANDALONE 12639# if ENABLE_FEATURE_SH_STANDALONE
12636 { 12640 {
12637 const char *a = applet_names; 12641 const char *a = applet_names;
12638 while (*a) { 12642 while (*a) {
@@ -12644,11 +12648,11 @@ helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
12644 a += strlen(a) + 1; 12648 a += strlen(a) + 1;
12645 } 12649 }
12646 } 12650 }
12647#endif 12651# endif
12648 out1fmt("\n\n"); 12652 out1fmt("\n\n");
12649 return EXIT_SUCCESS; 12653 return EXIT_SUCCESS;
12650} 12654}
12651#endif /* FEATURE_SH_EXTRA_QUIET */ 12655#endif
12652 12656
12653#if MAX_HISTORY 12657#if MAX_HISTORY
12654static int FAST_FUNC 12658static int FAST_FUNC