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

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



On Wed, Nov 16, 2016 at 09:34:32PM -0800, Bart Schaefer wrote:
> On Wed, Nov 16, 2016 at 6:33 PM, Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > % name=a;echo ${name:+foo[bar]}
> > zsh: no match
> > %
> > url-quote-magic:10: no match
> 
Oh, I can still reproduce this problem by running 

    name=a;echo ${name:+foo[bar]}

two times.
> What zsh version are you using?  I can't reproduce this (tried 5.2 and
> git HEAD).
> 

I am using git HEAD, this problem can be reprodced.

> Line 10 is
> 
> words=("${(@Q)${(z)lbuf}}")
> 
> To get the "no match" message you have to have cshnullglob set, and
> obviously you also have self-insert remapped to url-quote-magic.  I
> suspect you have another setting that is influencing this.

Yes, I have cshnullglob set and self-insert remapped. If I unset
cshnullglob, then this problem cannot be reproduced any more.

Those are all the options:

% setopt
autocd
autopushd
nobgnice
braceccl
completeinword
cshnullglob
extendedglob
extendedhistory
noglobalrcs
globcomplete
histexpiredupsfirst
histfindnodups
histignorespace
histlexwords
histsavenodups
histverify
incappendhistorytime
interactive
interactivecomments
kshtypeset
nolistambiguous
magicequalsubst
monitor
pushdignoredups
rcexpandparam
rcquotes
rmstarwait
shinstdin
zle

Thanks.



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