feat(redirect): do variable expansion on redirect targets

This commit is contained in:
Khaïs COLIN 2025-04-18 12:42:22 +02:00
parent 2ae001e00b
commit c00cc21ae4
4 changed files with 64 additions and 3 deletions

12
test.sh
View file

@ -808,4 +808,16 @@ the nuclear option
the nuclear option
EOF
when_run <<"EOF" "redirect with expansion in target"
export target=outfile
echo -n "hello " > $target
echo there >> $target
ls
cat < $target
EOF
expecting <<EOF
outfile
hello there
EOF
finalize