From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26002 invoked from network); 31 Jul 2004 09:12:33 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 31 Jul 2004 09:12:33 -0000 Received: (qmail 2861 invoked from network); 31 Jul 2004 09:12:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 31 Jul 2004 09:12:27 -0000 Received: (qmail 18428 invoked by alias); 31 Jul 2004 09:11:43 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7796 Received: (qmail 18418 invoked from network); 31 Jul 2004 09:11:43 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 31 Jul 2004 09:11:43 -0000 Received: (qmail 1043 invoked from network); 31 Jul 2004 09:09:45 -0000 Received: from unknown (HELO moonbase.zanshin.com) (167.160.213.139) by a.mx.sunsite.dk with SMTP; 31 Jul 2004 09:09:43 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.12.11/8.12.11) with ESMTP id i6V99g3S030198 for ; Sat, 31 Jul 2004 02:09:42 -0700 Date: Sat, 31 Jul 2004 02:09:42 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-users@sunsite.dk To: zsh-users@sunsite.dk Subject: Re: Why are Quotes necessay here? In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-1.4 required=6.0 tests=BAYES_20 autolearn=no version=2.63 X-Spam-Hits: -1.4 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?