From b287e2e27a388deecd9d9580f2a846b2b2efff42 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 8 Aug 2003 23:40:12 +0000 Subject: [PATCH] Use the new 'select' option to make the shell config much less evil and far more obvious. -Erik --- shell/Config.in | 65 ++++++++++++++++++++----------------------------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/shell/Config.in b/shell/Config.in index 6103ccfda..bd6f39f7d 100644 --- a/shell/Config.in +++ b/shell/Config.in @@ -13,15 +13,19 @@ choice and full featured. config CONFIG_FEATURE_SH_IS_ASH + select CONFIG_ASH bool "ash" config CONFIG_FEATURE_SH_IS_HUSH + select CONFIG_HUSH bool "hush" config CONFIG_FEATURE_SH_IS_LASH + select CONFIG_LASH bool "lash" config CONFIG_FEATURE_SH_IS_MSH + select CONFIG_MSH bool "msh" config CONFIG_FEATURE_SH_IS_NONE @@ -29,20 +33,15 @@ config CONFIG_FEATURE_SH_IS_NONE endchoice -if CONFIG_FEATURE_SH_IS_ASH - config CONFIG_ASH - default y - - comment "ash (forced enabled as default shell)" -endif - -if !CONFIG_FEATURE_SH_IS_ASH config CONFIG_ASH bool "ash" default y help - Make sh a link to ash. -endif + Tha 'ash' shell adds about 60k in the default configuration and is + the most complete and most pedantically correct shell included with + busybox. This shell is actually a derivitive the Debian 'dash' shell + (by Herbert Xu), which was created by porting the 'ash' shell + (written by Kenneth Almquist) from NetBSD. comment "Ash Shell Options" depends on CONFIG_ASH @@ -98,51 +97,41 @@ config CONFIG_ASH_OPTIMIZE_FOR_SIZE help Compile ash for reduced size at price of speed. -if CONFIG_FEATURE_SH_IS_HUSH - config CONFIG_HUSH - default y - - comment "hush (forced enabled as default shell)" -endif - -if !CONFIG_FEATURE_SH_IS_HUSH config CONFIG_HUSH bool "hush" default n help - Make sh a link to hush. -endif + hush is very small shell (just 18k) and it has fairly complete Bourne + shell grammer. It even handles all the normal flow control options + such as if/then/elif/else/fi, for/in/do/done, while loops, etc. -if CONFIG_FEATURE_SH_IS_LASH - config CONFIG_LASH - default y + It does not handle case/esac, select, function, here documents ( << + word ), arithmetic expansion, aliases, brace expansion, tilde + expansion, &> and >& redirection of stdout+stderr, etc. - comment "lash (forced enabled as default shell)" -endif -if !CONFIG_FEATURE_SH_IS_LASH config CONFIG_LASH bool "lash" default n help - Make sh a link to lash. -endif - -if CONFIG_FEATURE_SH_IS_MSH - config CONFIG_MSH - default y + lash is the very smallest shell (adds just 10k) and it is quite + usable as a command prompt, but it is not suitable for any but the + most trivial scripting (such as an initrd that calls insmod a few + times) since it does not understand any Bourne shell grammer. It + does handle pipes, redirects, and job control though. Adding in + command editing makes it a very nice lightweight command prompt. - comment "msh (forced enabled as default shell)" -endif -if !CONFIG_FEATURE_SH_IS_MSH config CONFIG_MSH bool "msh" default n help - Make sh a link to msh. -endif - + The minix shell (adds just 30k) is quite complete and handles things + like for/do/done, case/esac and all the things you expect a Bourne + shell to do. It is not always pedantically correct about Bourne + shell grammer (try running the shell testscript "tests/sh.testcases" + on it and compare vs bash) but for most things it works quite well. + It also uses only vfork, so it can be used on uClinux systems. comment "Bourne Shell Options" depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH -- 2.25.1