Make it possible to select "sh" and "bash" aliases without selecting ash or hush
[oweals/busybox.git] / shell / Config.src
1 #
2 # For a description of the syntax of this configuration file,
3 # see scripts/kbuild/config-language.txt.
4 #
5
6 menu "Shells"
7
8
9 choice
10         prompt "Choose which shell is aliased to 'sh' name"
11         default SH_IS_ASH
12         help
13           Choose which shell you want to be executed by 'sh' alias.
14           The ash shell is the most bash compatible and full featured one.
15
16 # note: cannot use "select ASH" here, it breaks "make allnoconfig"
17 config SH_IS_ASH
18         depends on !NOMMU
19         bool "ash"
20
21 config SH_IS_HUSH
22         bool "hush"
23
24 config SH_IS_NONE
25         bool "none"
26
27 endchoice
28
29 choice
30         prompt "Choose which shell is aliased to 'bash' name"
31         default BASH_IS_NONE
32         help
33           Choose which shell you want to be executed by 'bash' alias.
34           The ash shell is the most bash compatible and full featured one.
35
36           Note that selecting this option does not switch on any bash
37           compatibility code. It merely makes it possible to install
38           /bin/bash (sym)link and run scripts which start with
39           #!/bin/bash line.
40
41           Many systems use it in scripts which use bash-specific features,
42           even simple ones like $RANDOM. Without this option, busybox
43           can't be used for running them because it won't recongnize
44           "bash" as a supported applet name.
45
46 config BASH_IS_ASH
47         depends on !NOMMU
48         bool "ash"
49
50 config BASH_IS_HUSH
51         bool "hush"
52
53 config BASH_IS_NONE
54         bool "none"
55
56 endchoice
57
58
59 INSERT
60
61
62 config FEATURE_SH_MATH
63         bool "POSIX math support"
64         default y
65         depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
66         help
67           Enable math support in the shell via $((...)) syntax.
68
69 config FEATURE_SH_MATH_64
70         bool "Extend POSIX math support to 64 bit"
71         default y
72         depends on FEATURE_SH_MATH
73         help
74           Enable 64-bit math support in the shell. This will make the shell
75           slightly larger, but will allow computation with very large numbers.
76           This is not in POSIX, so do not rely on this in portable code.
77
78 config FEATURE_SH_EXTRA_QUIET
79         bool "Hide message on interactive shell startup"
80         default y
81         depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
82         help
83           Remove the busybox introduction when starting a shell.
84
85 config FEATURE_SH_STANDALONE
86         bool "Standalone shell"
87         default n
88         depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
89         help
90           This option causes busybox shells to use busybox applets
91           in preference to executables in the PATH whenever possible. For
92           example, entering the command 'ifconfig' into the shell would cause
93           busybox to use the ifconfig busybox applet. Specifying the fully
94           qualified executable name, such as '/sbin/ifconfig' will still
95           execute the /sbin/ifconfig executable on the filesystem. This option
96           is generally used when creating a statically linked version of busybox
97           for use as a rescue shell, in the event that you screw up your system.
98
99           This is implemented by re-execing /proc/self/exe (typically)
100           with right parameters. Some selected applets ("NOFORK" applets)
101           can even be executed without creating new process.
102           Instead, busybox will call <applet>_main() internally.
103
104           However, this causes problems in chroot jails without mounted /proc
105           and with ps/top (command name can be shown as 'exe' for applets
106           started this way).
107 # untrue?
108 #         Note that this will *also* cause applets to take precedence
109 #         over shell builtins of the same name. So turning this on will
110 #         eliminate any performance gained by turning on the builtin "echo"
111 #         and "test" commands in ash.
112 # untrue?
113 #         Note that when using this option, the shell will attempt to directly
114 #         run '/bin/busybox'. If you do not have the busybox binary sitting in
115 #         that exact location with that exact name, this option will not work at
116 #         all.
117
118 config FEATURE_SH_NOFORK
119         bool "Run 'nofork' applets directly"
120         default n
121         depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
122         help
123           This option causes busybox shells to not execute typical
124           fork/exec/wait sequence, but call <applet>_main directly,
125           if possible. (Sometimes it is not possible: for example,
126           this is not possible in pipes).
127
128           This will be done only for some applets (those which are marked
129           NOFORK in include/applets.h).
130
131           This may significantly speed up some shell scripts.
132
133           This feature is relatively new. Use with care. Report bugs
134           to project mailing list.
135
136 config FEATURE_SH_HISTFILESIZE
137         bool "Use $HISTFILESIZE"
138         default y
139         depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
140         help
141           This option makes busybox shells to use $HISTFILESIZE variable
142           to set shell history size. Note that its max value is capped
143           by "History size" setting in library tuning section.
144
145
146 endmenu