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

Re: auto-quoting inside braces in arguments



Bart Schaefer wrote on Thu, Feb 18, 2021 at 14:44:29 -0800:
> On Thu, Feb 18, 2021 at 2:13 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > Hang on.  Why would it matter which style of quotes would have been
> > used?
> 
> In your example, what if $foo and $baz have an opening and closing
> quote in their values?

As I wrote in the part you'd snipped:

> > > normally $foo would be constructed to end on inter-token whitespace,

It's of course possible to write code where the number of q's in bar matters
(for instance, «eval ${:-\$}${(q…):-lorem}»), but that falls under "don't do
that".




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