hush: specially handle [[ - suppress globbing & multiword expansion
It's a bashism, but is surprisingly easy to do and costs very little code. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
19
shell/hush_test/hush-bugs/export_exp.tests
Executable file
19
shell/hush_test/hush-bugs/export_exp.tests
Executable file
@@ -0,0 +1,19 @@
|
||||
v="a=aa0 b=bb0"
|
||||
# only 1st arg should be expanded in multiple words
|
||||
export $v c=$v
|
||||
echo $a $b
|
||||
echo $c
|
||||
|
||||
# only 1st arg should be expanded in multiple words
|
||||
export `echo a=aa1 b=bb1` c=`echo a=aa1 b=bb1`
|
||||
echo $a $b
|
||||
echo $c
|
||||
|
||||
>zz=zz
|
||||
>zzz=zzz
|
||||
# only 1st arg should be globbed
|
||||
export zzz* zz=*
|
||||
env | grep ^zz | sort
|
||||
rm -rf zz=zz zzz=zzz
|
||||
|
||||
echo Done
|
||||
Reference in New Issue
Block a user