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

Re: Why are Quotes necessay here?



On Fri, 30 Jul 2004, zzapper wrote:

> Not necessarily just zsh, and may be I'm being thick today, but why are 
> the double quotes around the $1* necessary here?
> 
> elif builtin cd "$1*" &> /dev/null ;

I'd say they're not necessary and probably wrong, but as you haven't given 
any other context (such as, in what function or script did you find that 
snippet?) it's really not possible to be sure.

It helps if you remember that we're neither psychic nor looking over your
shoulder at your screen ...

> Was the star otherwise being expanded?

It otherwise might be, yes, but only if the value of $1 was a prefix of a
matching file name.

> without quotes I get
> 
>  no matches found: raynin*

That error is printed in that format only when the nomatch option is set, 
which contradicts what you say next.

> I have 
> setopt localoptions nonomatch

You "have" that where?



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