hush: support "f() (cmd)" functions
Many other shells support this construct function old new delta parse_stream 2950 3018 +68 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -1,6 +1,3 @@
|
||||
1
|
||||
2
|
||||
3
|
||||
1
|
||||
2
|
||||
3
|
||||
|
@ -6,8 +6,3 @@ f 2
|
||||
|
||||
f() ( echo $1 )
|
||||
f 3
|
||||
|
||||
f() for i in 1 2 3; do
|
||||
echo $i
|
||||
done
|
||||
f
|
||||
|
3
shell/ash_test/ash-misc/func_compound1.right
Normal file
3
shell/ash_test/ash-misc/func_compound1.right
Normal file
@ -0,0 +1,3 @@
|
||||
1
|
||||
2
|
||||
3
|
4
shell/ash_test/ash-misc/func_compound1.tests
Executable file
4
shell/ash_test/ash-misc/func_compound1.tests
Executable file
@ -0,0 +1,4 @@
|
||||
f() for i in 1 2 3; do
|
||||
echo $i
|
||||
done
|
||||
f
|
Reference in New Issue
Block a user