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

nohistsubstpattern and :s//



% setopt histsubstpattern; a=(aaa bab cac) b=d; echo $a:s/a/${b}/
daa bdb cdc
% setopt nohistsubstpattern; a=(aaa bab cac) b=d; echo $a:s/a/${b}/
${b}aa b${b}b cdc

(reported on irc).

I looked at the documentation of histsubstpattern and the :s/l/r/
flag, and it mostly talks about the effect of the option on the l
part. Even if this effect is somehow desired, it seems inconsistent
that the final element still gets the value of the parameter
substituted.

-- 
Mikael Magnusson



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