Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[BUG] In reference to patch 39815, about (z) flag and $( parse error



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