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

Re: Remind me why ${name+word} is the way it is?



On Thu, Nov 17, 2016 at 10:33:25AM +0800, Han Pingtian wrote:
> On Fri, Nov 11, 2016 at 08:34:00PM -0800, Bart Schaefer wrote:
> > Noodling with something else and ...
> > 
> > torch% name='foo[bar]'
> > torch% echo ${name}
> > foo[bar]
> > torch% echo ${name+foo[bar]}
> When I was trying this I got this strange result of 'url-quote-magic':
> 
> % name=a;echo ${name:+foo[bar]}
> zsh: no match
> %
> url-quote-magic:10: no match
> %
> url-quote-magic:10: no match
> %
> url-quote-magic:10: no match
> %
> url-quote-magic:10: no match
> %    =
> url-quote-magic:10: no match
> %    ==
> url-quote-magic:10: no match
> %    ===
> url-quote-magic:10: no match
> %    ====
> url-quote-magic:10: no match
> %    =====
> 
> space and = cause the warning "url-quote-magic:10: no match". This only
> can be triggered by running "name=a;echo ${name:+foo[bar]}" first.

Never mind. This problem gone away after a recompilation.



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