zsh-workers
 help / color / mirror / code / Atom feed
* [BUG] In reference to patch 39815, about (z) flag and $( parse error
@ 2017-10-10 15:03 Sebastian Gniazdowski
  2017-10-10 16:19 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 23+ messages in thread
From: Sebastian Gniazdowski @ 2017-10-10 15:03 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-10-17  6:42 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-10 15:03 [BUG] In reference to patch 39815, about (z) flag and $( parse error Sebastian Gniazdowski
2017-10-10 16:19 ` Sebastian Gniazdowski
2017-10-11  3:49   ` Bart Schaefer
2017-10-11  6:41     ` Peter Stephenson
     [not found]   ` <etPan.59dd94f1.69ba7f51.98a8@AirmailxGenerated.am>
2017-10-11  8:31     ` Sebastian Gniazdowski
2017-10-11 14:09       ` Sebastian Gniazdowski
2017-10-11 15:07         ` Sebastian Gniazdowski
2017-10-11 17:02       ` Bart Schaefer
2017-10-12 14:54         ` Sebastian Gniazdowski
2017-10-12 15:26           ` Bart Schaefer
2017-10-12 15:50             ` Peter Stephenson
2017-10-13  7:56               ` Bart Schaefer
2017-10-13  9:36                 ` Peter Stephenson
2017-10-13 20:55                   ` Bart Schaefer
2017-10-14 14:44                     ` Sebastian Gniazdowski
2017-10-15  1:53                       ` Bart Schaefer
2017-10-15 14:31                         ` Sebastian Gniazdowski
2017-10-15 18:09                           ` Bart Schaefer
2017-10-15 18:44                             ` Daniel Shahaf
2017-10-15 19:59                               ` Bart Schaefer
2017-10-17  6:34                             ` Sebastian Gniazdowski
2017-10-13  7:53             ` Sebastian Gniazdowski
2017-10-13  8:04               ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).