2 # For a description of the syntax of this configuration file,
3 # see scripts/kbuild/config-language.txt.
9 prompt "Choose your default shell"
10 default FEATURE_SH_IS_NONE
12 Choose a shell. The ash shell is the most bash compatible
13 and full featured one.
15 config FEATURE_SH_IS_ASH
20 config FEATURE_SH_IS_HUSH
24 ####config FEATURE_SH_IS_LASH
28 ####config FEATURE_SH_IS_MSH
32 config FEATURE_SH_IS_NONE
42 Tha 'ash' shell adds about 60k in the default configuration and is
43 the most complete and most pedantically correct shell included with
44 busybox. This shell is actually a derivative of the Debian 'dash'
45 shell (by Herbert Xu), which was created by porting the 'ash' shell
46 (written by Kenneth Almquist) from NetBSD.
48 config ASH_BASH_COMPAT
49 bool "bash-compatible extensions"
53 Enable bash-compatible extensions.
55 config ASH_JOB_CONTROL
60 Enable job control in the ash shell.
62 config ASH_READ_NCHARS
63 bool "'read -n N' and 'read -s' support"
67 'read -n N' will return a value after N characters have been read.
68 'read -s' will read without echoing the user's input.
70 config ASH_READ_TIMEOUT
71 bool "'read -t S' support"
75 'read -t S' will return a value after S seconds have passed.
76 This implementation will allow fractional seconds, expressed
77 as a decimal fraction, e.g. 'read -t 2.5 foo'.
84 Enable alias support in the ash shell.
87 bool "Builtin getopt to parse positional parameters"
91 Enable getopts builtin in the ash shell.
93 config ASH_BUILTIN_ECHO
94 bool "Builtin version of 'echo'"
98 Enable support for echo, builtin to ash.
100 config ASH_BUILTIN_PRINTF
101 bool "Builtin version of 'printf'"
105 Enable support for printf, builtin to ash.
107 config ASH_BUILTIN_TEST
108 bool "Builtin version of 'test'"
112 Enable support for test, builtin to ash.
115 bool "'command' command to override shell builtins"
119 Enable support for the ash 'command' builtin, which allows
120 you to run the specified command with the specified arguments,
121 even when there is an ash builtin command with the same name.
124 bool "Check for new mail on interactive shells"
128 Enable "check for new mail" in the ash shell.
130 config ASH_OPTIMIZE_FOR_SIZE
131 bool "Optimize for size instead of speed"
135 Compile ash for reduced size at the price of speed.
137 config ASH_RANDOM_SUPPORT
138 bool "Pseudorandom generator and $RANDOM variable"
142 Enable pseudorandom generator and dynamic variable "$RANDOM".
143 Each read of "$RANDOM" will generate a new pseudorandom value.
144 You can reset the generator by using a specified start value.
145 After "unset RANDOM" the generator will switch off and this
146 variable will no longer have special treatment.
148 config ASH_EXPAND_PRMT
149 bool "Expand prompt string"
153 "PS#" may contain volatile content, such as backquote commands.
154 This option recreates the prompt string from the environment
155 variable each time it is displayed.
161 hush is a small shell (22k). It handles the normal flow control
162 constructs such as if/then/elif/else/fi, for/in/do/done, while loops,
163 case/esac. Redirections, here documents, $((arithmetic))
164 and functions are supported.
166 It will compile and work on no-mmu systems.
168 It does not handle select, aliases, brace expansion,
169 tilde expansion, &>file and >&file redirection of stdout+stderr.
171 config HUSH_BASH_COMPAT
172 bool "bash-compatible extensions"
176 Enable bash-compatible extensions.
183 Enable help builtin in hush. Code size + ~1 kbyte.
185 config HUSH_INTERACTIVE
186 bool "Interactive mode"
190 Enable interactive mode (prompt and command editing).
191 Without this, hush simply reads and executes commands
192 from stdin just like a shell script from a file.
193 No prompt, no PS1/PS2 magic shell variables.
198 depends on HUSH_INTERACTIVE
200 Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current
201 command (not entire shell), fg/bg builtins work. Without this option,
202 "cmd &" still works by simply spawning a process and immediately
203 prompting for next command (or executing next command in a script),
204 but no separate process group is formed.
207 bool "Process substitution"
211 Enable process substitution `command` and $(command) in hush.
214 bool "Support if/then/elif/else/fi"
218 Enable if/then/elif/else/fi in hush.
221 bool "Support for, while and until loops"
225 Enable for, while and until loops in hush.
228 bool "Support case ... esac statement"
232 Enable case ... esac statement in hush. +400 bytes.
234 config HUSH_FUNCTIONS
235 bool "Support funcname() { commands; } syntax"
239 Enable support for shell functions in hush. +800 bytes.
242 bool "Support local builtin"
244 depends on HUSH_FUNCTIONS
246 Enable support for local variables in functions.
249 bool "Support export '-n' option"
253 Enable support for export '-n' option in hush. It is a bash extension.
255 config HUSH_RANDOM_SUPPORT
256 bool "Pseudorandom generator and $RANDOM variable"
260 Enable pseudorandom generator and dynamic variable "$RANDOM".
261 Each read of "$RANDOM" will generate a new pseudorandom value.
264 bool "lash (deprecated: aliased to hush)"
268 lash is deprecated and will be removed, please migrate to hush.
271 bool "msh (deprecated: please use hush)"
275 msh is deprecated and will be removed, please migrate to hush.
276 If there is a feature msh has but hush does not, please let us know.
278 # The minix shell (adds just 30k) is quite complete and handles things
279 # like for/do/done, case/esac and all the things you expect a Bourne
280 # shell to do. It is not always pedantically correct about Bourne
281 # shell grammar (try running the shell testscript "tests/sh.testcases"
282 # on it and compare vs bash) but for most things it works quite well.
283 # It uses only vfork, so it can be used on uClinux systems.
286 config SH_MATH_SUPPORT
287 bool "POSIX math support"
289 depends on ASH || HUSH
291 Enable math support in the shell via $((...)) syntax.
293 config SH_MATH_SUPPORT_64
294 bool "Extend POSIX math support to 64 bit"
296 depends on SH_MATH_SUPPORT
298 Enable 64-bit math support in the shell. This will make the shell
299 slightly larger, but will allow computation with very large numbers.
300 This is not in POSIX, so do not rely on this in portable code.
302 config FEATURE_SH_EXTRA_QUIET
303 bool "Hide message on interactive shell startup"
305 depends on MSH || LASH || HUSH || ASH
307 Remove the busybox introduction when starting a shell.
309 config FEATURE_SH_STANDALONE
310 bool "Standalone shell"
312 depends on (MSH || LASH || HUSH || ASH) && FEATURE_PREFER_APPLETS
314 This option causes busybox shells to use busybox applets
315 in preference to executables in the PATH whenever possible. For
316 example, entering the command 'ifconfig' into the shell would cause
317 busybox to use the ifconfig busybox applet. Specifying the fully
318 qualified executable name, such as '/sbin/ifconfig' will still
319 execute the /sbin/ifconfig executable on the filesystem. This option
320 is generally used when creating a statically linked version of busybox
321 for use as a rescue shell, in the event that you screw up your system.
323 This is implemented by re-execing /proc/self/exe (typically)
324 with right parameters. Some selected applets ("NOFORK" applets)
325 can even be executed without creating new process.
326 Instead, busybox will call <applet>_main() internally.
328 However, this causes problems in chroot jails without mounted /proc
329 and with ps/top (command name can be shown as 'exe' for applets
332 # Note that this will *also* cause applets to take precedence
333 # over shell builtins of the same name. So turning this on will
334 # eliminate any performance gained by turning on the builtin "echo"
335 # and "test" commands in ash.
337 # Note that when using this option, the shell will attempt to directly
338 # run '/bin/busybox'. If you do not have the busybox binary sitting in
339 # that exact location with that exact name, this option will not work at
342 config FEATURE_SH_NOFORK
343 bool "Run 'nofork' applets directly"
345 depends on (MSH || LASH || HUSH || ASH) && FEATURE_PREFER_APPLETS
347 This option causes busybox shells [currently only ash]
348 to not execute typical fork/exec/wait sequence, but call <applet>_main
349 directly, if possible. (Sometimes it is not possible: for example,
350 this is not possible in pipes).
352 This will be done only for some applets (those which are marked
353 NOFORK in include/applets.h).
355 This may significantly speed up some shell scripts.
357 This feature is relatively new. Use with care.
363 One common problem reported on the mailing list is "can't access tty;
364 job control turned off" error message which typically appears when
365 one tries to use shell with stdin/stdout opened to /dev/console.
366 This device is special - it cannot be a controlling tty.
368 Proper solution is to use correct device instead of /dev/console.
370 cttyhack provides "quick and dirty" solution to this problem.
371 It analyzes stdin with various ioctls, trying to determine whether
372 it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line).
373 If it detects one, it closes stdin/out/err and reopens that device.
374 Then it executes given program. Usage example for /etc/inittab
377 ::respawn:/bin/cttyhack /bin/sh