mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-23 04:30:24 +02:00
26622: improve comments within $(...) and add test
This commit is contained in:
parent
3d63a33407
commit
a85db68271
3 changed files with 20 additions and 2 deletions
|
@ -503,3 +503,15 @@
|
|||
$ZTST_testdir/../Src/zsh -f NonExistentScript
|
||||
127q:Non-existent script causes exit status 127
|
||||
?$ZTST_testdir/../Src/zsh: can't open input file: NonExistentScript
|
||||
|
||||
(setopt nonomatch
|
||||
# use this to get stuff at start of line
|
||||
contents=$'# comment \'\necho value #with " stuff\n# comment\n#comment
|
||||
echo not#comment\n'
|
||||
eval 'VAR=$('"$contents"')'
|
||||
print -l $VAR)
|
||||
0:comments within $(...)
|
||||
>value
|
||||
>not#comment
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue