#
# For a description of the syntax of this configuration file,
# see scripts/kbuild/config-language.txt.
#

menu "Shells"

choice
	prompt "Choose your default shell"
	default FEATURE_SH_IS_NONE
	help
	  Choose a shell. The ash shell is the most bash compatible
	  and full featured one.

config FEATURE_SH_IS_ASH
	select ASH
	bool "ash"

config FEATURE_SH_IS_HUSH
	select HUSH
	bool "hush"

config FEATURE_SH_IS_LASH
	select LASH
	bool "lash"

config FEATURE_SH_IS_MSH
	select MSH
	bool "msh"

config FEATURE_SH_IS_NONE
	bool "none"

endchoice

config ASH
	bool "ash"
	default n
	select TEST
	help
	  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 derivative of 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 ASH

config ASH_JOB_CONTROL
	bool "Job control"
	default y
	depends on ASH
	help
	  Enable job control in the ash shell.

config ASH_READ_NCHARS
	bool "'read -n N' and 'read -s' support"
	default n
	depends on ASH
	help
	  'read -n N' will return a value after N characters have been read.
	  'read -s' will read without echoing the user's input.

config ASH_READ_TIMEOUT
	bool "'read -t S' support."
	default n
	depends on ASH
	help
	  'read -t S' will return a value after S seconds have passed.
	  This implementation will allow fractional seconds, expressed
	  as a decimal fraction, e.g. 'read -t 2.5 foo'.

config ASH_ALIAS
	bool "alias support"
	default y
	depends on ASH
	help
	  Enable alias support in the ash shell.

config ASH_MATH_SUPPORT
	bool "Posix math support"
	default y
	depends on ASH
	help
	  Enable math support in the ash shell.

config ASH_MATH_SUPPORT_64
	bool "Extend Posix math support to 64 bit"
	default n
	depends on ASH_MATH_SUPPORT
	help
	  Enable 64-bit math support in the ash shell.  This will make
	  the shell slightly larger, but will allow computation with very
	  large numbers.

config ASH_GETOPTS
	bool "Builtin getopt to parse positional parameters"
	default n
	depends on ASH
	help
	  Enable getopts builtin in the ash shell.

config ASH_BUILTIN_ECHO
	bool "Builtin version of 'echo'"
	default y
	select ECHO
	depends on ASH
	help
	  Enable support for echo, builtin to ash.

config ASH_BUILTIN_TEST
	bool "Builtin version of 'test'"
	default y
	select TEST
	depends on ASH
	help
	  Enable support for test, builtin to ash.

config ASH_CMDCMD
	bool "'command' command to override shell builtins"
	default n
	depends on ASH
	help
	  Enable support for the ash 'command' builtin, which allows
	  you to run the specified command with the specified arguments,
	  even when there is an ash builtin command with the same name.

config ASH_MAIL
	bool "Check for new mail on interactive shells"
	default y
	depends on ASH
	help
	  Enable "check for new mail" in the ash shell.

config ASH_OPTIMIZE_FOR_SIZE
	bool "Optimize for size instead of speed"
	default y
	depends on ASH
	help
	  Compile ash for reduced size at the price of speed.

config ASH_RANDOM_SUPPORT
	bool "Pseudorandom generator and variable $RANDOM"
	default n
	depends on ASH
	help
	  Enable pseudorandom generator and dynamic variable "$RANDOM".
	  Each read of "$RANDOM" will generate a new pseudorandom value.
	  You can reset the generator by using a specified start value.
	  After "unset RANDOM" then generator will switch off and this
	  variable will no longer have special treatment.

config ASH_EXPAND_PRMT
	bool "Expand prompt string"
	default n
	depends on ASH
	help
	  "PS#" may be contain volatile content, such as backquote commands.
	  This option recreates the prompt string from the environment
	  variable each time it is displayed.

config HUSH
	bool "hush"
	default n
	select TRUE
	select FALSE
	select TEST
	help
	  hush is a very small shell (just 18k) and it has fairly complete
	  Bourne shell grammar.  It even handles all the normal flow control
	  options such as if/then/elif/else/fi, for/in/do/done, while loops,
	  etc.

	  It does not handle case/esac, select, function, here documents ( <<
	  word ), arithmetic expansion, aliases, brace expansion, tilde
	  expansion, &> and >& redirection of stdout+stderr, etc.


config LASH
	bool "lash"
	default n
	select TRUE
	select FALSE
	select TEST
	help
	  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 grammar.  It
	  does handle pipes, redirects, and job control though.  Adding in
	  command editing makes it a very nice lightweight command prompt.


config MSH
	bool "msh"
	default n
	select TRUE
	select FALSE
	select TEST
	help
	  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 grammar (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 MSH || LASH || HUSH || ASH

config FEATURE_SH_EXTRA_QUIET
	bool "Hide message on interactive shell startup"
	default n
	depends on MSH || LASH || HUSH || ASH
	help
	  Remove the busybox introduction when starting a shell.

config FEATURE_SH_STANDALONE
	bool "Standalone shell"
	default n
	depends on (MSH || LASH || HUSH || ASH) && FEATURE_PREFER_APPLETS
	help
	  This option causes the selected busybox shell to use busybox applets
	  in preference to executables in the PATH whenever possible.  For
	  example, entering the command 'ifconfig' into the shell would cause
	  busybox to use the ifconfig busybox applet.  Specifying the fully
	  qualified executable name, such as '/sbin/ifconfig' will still
	  execute the /sbin/ifconfig executable on the filesystem.  This option
	  is generally used when creating a statically linked version of busybox
	  for use as a rescue shell, in the event that you screw up your system.

	  Note that this will *also* cause applets to take precedence
	  over shell builtins of the same name.  So turning this on will
	  eliminate any performance gained by turning on the builtin "echo"
	  and "test" commands in ash.

	  Note that when using this option, the shell will attempt to directly
	  run '/bin/busybox'.  If you do not have the busybox binary sitting in
	  that exact location with that exact name, this option will not work at
	  all.

endmenu
