zsh-users
 help / color / mirror / code / Atom feed
* Why are Quotes necessay here?
@ 2004-07-30 11:56 zzapper
  2004-07-31  9:09 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: zzapper @ 2004-07-30 11:56 UTC (permalink / raw)
  To: zsh-users

Hi,

Not necessarily just zsh, and may be I'm being thick today, but why are the double quotes around
the $1* necessary here?

Was the star otherwise being expanded?

elif builtin cd "$1*" &> /dev/null ;

without quotes I get

 no matches found: raynin*

I have 
setopt localoptions nonomatch

zzapper (vim, cygwin, wiki & zsh)
--

vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Why are Quotes necessay here?
  2004-07-30 11:56 Why are Quotes necessay here? zzapper
@ 2004-07-31  9:09 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2004-07-31  9:09 UTC (permalink / raw)
  To: zsh-users

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?


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-31  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-30 11:56 Why are Quotes necessay here? zzapper
2004-07-31  9:09 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).