hush: finish and enable optional case...esac support. Code size cost:
function old new delta run_list 1891 2075 +184 parse_stream 1764 1847 +83 expand_strvec_to_string - 83 +83 done_word 647 715 +68 static.reserved_list 144 168 +24 static.reserved_match - 12 +12 done_pipe 95 105 +10 builtin_exit 48 46 -2 builtin_eval 127 54 -73 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 5/2 up/down: 464/-75) Total: 389 bytes
This commit is contained in:
@@ -178,9 +178,11 @@ config HUSH
|
||||
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.
|
||||
case/esac.
|
||||
|
||||
It does not handle case/esac, select, function, here documents ( <<
|
||||
It uses only vfork, so it can be used on uClinux systems.
|
||||
|
||||
It does not handle select, functions, here documents ( <<
|
||||
word ), arithmetic expansion, aliases, brace expansion, tilde
|
||||
expansion, &> and >& redirection of stdout+stderr, etc.
|
||||
|
||||
@@ -232,6 +234,14 @@ config HUSH_LOOPS
|
||||
depends on HUSH
|
||||
help
|
||||
Enable for, while and until loops in hush.
|
||||
As of 2008-07, break and continue statements are not supported.
|
||||
|
||||
config HUSH_CASE
|
||||
bool "Support case ... esac statement"
|
||||
default n
|
||||
depends on HUSH
|
||||
help
|
||||
Enable case ... esac statement in hush. +400 bytes.
|
||||
|
||||
config LASH
|
||||
bool "lash"
|
||||
@@ -249,7 +259,7 @@ config MSH
|
||||
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.
|
||||
It uses only vfork, so it can be used on uClinux systems.
|
||||
|
||||
comment "Bourne Shell Options"
|
||||
depends on MSH || LASH || HUSH || ASH
|
||||
|
||||
Reference in New Issue
Block a user