Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[BUG] In reference to patch 39815, about (z) flag and $( parse error
- X-seq: zsh-workers 41850
- From: Sebastian Gniazdowski <psprint@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [BUG] In reference to patch 39815, about (z) flag and $( parse error
- Date: Tue, 10 Oct 2017 17:03:34 +0200
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hello,
there's patch:
2016-11-03 4073a66 39815: Read input to end on parse error in $(...) inside a string.
It almost fixes following issue. There's syntax.txt:
asmcmds+=(${(o)$(cgasm -f '.*' | perl -alne '
BEGIN{ my @cmds; }
push @cmds, split(/ /, lc $F[0] =~ y|/| |r);
END{ print join " ", @cmds;}'
)})
dbpkgs+=(${(fo@)$(pacman -Qq)})
On 5.2:
% data=$(<syntax.txt)
% arr=( "${(Z+cn+)data}" )
% print -rl "${arr[@]}"
asmcmds+=(
${(o)$(cgasm -f '.*' | perl -alne '
BEGIN{ my @cmds; }
push @cmds, split(/ /, lc $F[0] =~ y|/| |r);
END{ print join " ", @cmds;}'
%
On 5.3 (has the patch):
% data=$(<syntax.txt)
% arr=( "${(Z+cn+)data}" )
% print -rl "${arr[@]}"
asmcmds+=(
${(o)$(cgasm -f '.*' | perl -alne '
BEGIN{ my @cmds; }
push @cmds, split(/ /, lc $F[0] =~ y|/| |r);
END{ print join " ", @cmds;}'
)})
dbpkgs+=(${(fo@)$(pacman -Qq)})
%
Then, doing on 5.3:
% a='dbpkgs+=(${(fo@)$(pacman -Qq)})'
% print -rl "${(Z+cn+)a}"
dbpkgs+=(
${(fo@)$(pacman -Qq)}
)
So something is still wrong?
--
Sebastian Gniazdowski
psprint /at/ zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author