aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-13 14:23:12 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-13 14:23:12 +0000
commit2b2183a77d7e8a01723fb96e7a39f109b15475f4 (patch)
tree3f7c27589c441fd1b82c8487b2c8eea70ee3d356 /shell
parent323cbbfaa25f6bdc1ef343db01e58da3fea7fe6d (diff)
downloadbusybox-w32-2b2183a77d7e8a01723fb96e7a39f109b15475f4.tar.gz
busybox-w32-2b2183a77d7e8a01723fb96e7a39f109b15475f4.tar.bz2
busybox-w32-2b2183a77d7e8a01723fb96e7a39f109b15475f4.zip
hush: make function support configurable
Diffstat (limited to 'shell')
-rw-r--r--shell/Config.in35
-rw-r--r--shell/hush.c2
2 files changed, 21 insertions, 16 deletions
diff --git a/shell/Config.in b/shell/Config.in
index 9b3ce6483..6cc11ce80 100644
--- a/shell/Config.in
+++ b/shell/Config.in
@@ -159,16 +159,15 @@ config HUSH
159 bool "hush" 159 bool "hush"
160 default n 160 default n
161 help 161 help
162 hush is a very small shell (just 18k) and it has fairly complete 162 hush is a small shell (22k). It handles the normal flow control
163 Bourne shell grammar. It even handles all the normal flow control 163 constructs such as if/then/elif/else/fi, for/in/do/done, while loops,
164 options such as if/then/elif/else/fi, for/in/do/done, while loops, 164 case/esac. Redirections, here documents, $((arithmetic))
165 case/esac. 165 and functions are supported.
166 166
167 It will compile and work on no-mmu systems. 167 It will compile and work on no-mmu systems.
168 168
169 It does not handle select, functions, here documents ( << 169 It does not handle select, aliases, brace expansion,
170 word ), aliases, brace expansion, tilde expansion, 170 tilde expansion, &>file and >&file redirection of stdout+stderr.
171 &> and >& redirection of stdout+stderr, etc.
172 171
173config HUSH_HELP 172config HUSH_HELP
174 bool "help builtin" 173 bool "help builtin"
@@ -226,6 +225,13 @@ config HUSH_CASE
226 help 225 help
227 Enable case ... esac statement in hush. +400 bytes. 226 Enable case ... esac statement in hush. +400 bytes.
228 227
228config HUSH_FUNCTIONS
229 bool "Support funcname() { commands; } syntax"
230 default n
231 depends on HUSH
232 help
233 Enable support for shell functions in hush. +800 bytes.
234
229config LASH 235config LASH
230 bool "lash (deprecated: aliased to hush)" 236 bool "lash (deprecated: aliased to hush)"
231 default n 237 default n
@@ -237,16 +243,17 @@ config MSH
237 bool "msh (deprecated: please use hush)" 243 bool "msh (deprecated: please use hush)"
238 default n 244 default n
239 help 245 help
240 The minix shell (adds just 30k) is quite complete and handles things
241 like for/do/done, case/esac and all the things you expect a Bourne
242 shell to do. It is not always pedantically correct about Bourne
243 shell grammar (try running the shell testscript "tests/sh.testcases"
244 on it and compare vs bash) but for most things it works quite well.
245 It uses only vfork, so it can be used on uClinux systems.
246
247 msh is deprecated and will be removed, please migrate to hush. 246 msh is deprecated and will be removed, please migrate to hush.
248 If there is a feature msh has but hush does not, please let us know. 247 If there is a feature msh has but hush does not, please let us know.
249 248
249# The minix shell (adds just 30k) is quite complete and handles things
250# like for/do/done, case/esac and all the things you expect a Bourne
251# shell to do. It is not always pedantically correct about Bourne
252# shell grammar (try running the shell testscript "tests/sh.testcases"
253# on it and compare vs bash) but for most things it works quite well.
254# It uses only vfork, so it can be used on uClinux systems.
255
256
250comment "Bourne Shell Options" 257comment "Bourne Shell Options"
251 depends on MSH || LASH || HUSH || ASH 258 depends on MSH || LASH || HUSH || ASH
252 259
diff --git a/shell/hush.c b/shell/hush.c
index 9c2c0f324..ba3e2c3f0 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -83,8 +83,6 @@
83 * Keeping 1 for now even in released versions. 83 * Keeping 1 for now even in released versions.
84 */ 84 */
85#define HUSH_DEBUG 1 85#define HUSH_DEBUG 1
86/* In progress... */
87#define ENABLE_HUSH_FUNCTIONS 1
88 86
89 87
90#if BUILD_AS_NOMMU 88#if BUILD_AS_NOMMU