hush: fix heredoc expansion of $var and cmd
function old new delta expand_pseudo_dquoted - 104 +104 setup_heredoc 215 275 +60 done_word 669 691 +22 parse_stream 1899 1902 +3 setup_redirects 196 191 -5 free_pipe 189 183 -6 expand_variables 2349 2229 -120 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/3 up/down: 189/-131) Total: 58 bytes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
exit EOF-f
|
||||
"
|
||||
echo 1
|
||||
echo Hello World
|
||||
moo
|
||||
EOF-f
|
||||
EOF-f f
|
||||
|
@@ -3,6 +3,7 @@ f=1
|
||||
exit EOF-f
|
||||
"
|
||||
echo $f
|
||||
echo `echo Hello World`
|
||||
moo
|
||||
EOF-f
|
||||
EOF-f f
|
||||
|
8
shell/hush_test/hush-misc/heredoc3.right
Normal file
8
shell/hush_test/hush-misc/heredoc3.right
Normal file
@@ -0,0 +1,8 @@
|
||||
exit EOF-f
|
||||
"
|
||||
echo $f
|
||||
echo `echo Hello World`
|
||||
moo
|
||||
EOF-f
|
||||
EOF-f f
|
||||
EOF-f
|
11
shell/hush_test/hush-misc/heredoc3.tests
Executable file
11
shell/hush_test/hush-misc/heredoc3.tests
Executable file
@@ -0,0 +1,11 @@
|
||||
f=1
|
||||
cat <<- EOF-f""
|
||||
exit EOF-f
|
||||
"
|
||||
echo $f
|
||||
echo `echo Hello World`
|
||||
moo
|
||||
EOF-f
|
||||
EOF-f f
|
||||
EOF-f
|
||||
EOF-f
|
Reference in New Issue
Block a user