mirror of
https://github.com/sheumann/hush.git
synced 2024-12-23 05:29:58 +00:00
95ebcf79ff
Where the POSIX shell allows functions to be defined as: name () compound-command [ redirections ] bash adds the alternative syntax: function name [()] compound-command [ redirections ] Implement this in ash's bash compatibility mode. Most compound commands work (for/while/until/if/case/[[]]/{}); one exception is: function f (echo "no way!") The other two variants work: f() (echo "ok") function f() (echo "also ok") function old new delta parse_command 1555 1744 +189 tokname_array 232 240 +8 .rodata 155612 155566 -46 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 197/-46) Total: 151 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> |
||
---|---|---|
.. | ||
command2.right | ||
command2.tests | ||
command.right | ||
command.tests | ||
echo_write_error.right | ||
echo_write_error.tests | ||
exec.right | ||
exec.tests | ||
for.right | ||
for.tests | ||
func1.right | ||
func1.tests | ||
func2.right | ||
func2.tests | ||
func3.right | ||
func3.tests | ||
func4.right | ||
func4.tests | ||
func5.right | ||
func5.tests | ||
func_args1.right | ||
func_args1.tests | ||
func_bash1.right | ||
func_bash1.tests | ||
func_local1.right | ||
func_local1.tests | ||
func_local2.right | ||
func_local2.tests | ||
last_amp.right | ||
last_amp.tests | ||
local1.right | ||
local1.tests | ||
local2.right | ||
local2.tests | ||
nulltick1.right | ||
nulltick1.tests | ||
shift1.right | ||
shift1.tests | ||
source1.right | ||
source1.tests | ||
source2.right | ||
source2.tests | ||
tickquote1.right | ||
tickquote1.tests |