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

Should (z) PE flag split & during expansion?



The following:

printf '<%s>' ${(z)${:-'!-2:&'}}

Yields this:

<!-2:><&>

Which does not make sense if we consider that & is valid in parameter
expansions. At least for history expansions, such as would be the case
for the following setup:

echo foo_replaceme_bar
echo baz_replaceme_qux
!-2:s/replaceme/subst/ && !-1:&

I realize the manual (14.1.4) states "In parameter expansion the &
must appear inside braces, and in filename generation it must be
quoted with a backslash."

But even so, the following:

printf '<%s>' ${(z)${:-'!{-2:&}'}}

Yields this:

<!{-2:><&><}>

This was identified in issue #929 in zsh-users/zsh-syntax-highlighting
on GitHub.

--
Regards,
Zaidhaan




Messages sorted by: Reverse Date, Date, Thread, Author