From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id IAA11668 for ; Tue, 23 Jul 1996 08:35:53 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id SAA04903; Mon, 22 Jul 1996 18:34:15 -0400 (EDT) Resent-Date: Mon, 22 Jul 1996 18:33:10 -0400 (EDT) From: segal@morgan.com (Morris M. Siegel) Date: Mon, 22 Jul 1996 18:31:40 -0400 Message-Id: <9607221831.ZM3714@morgan.com> In-Reply-To: "Bart Schaefer" "Re: Bug in case stmt with '('" (Jul 22, 2:51pm) References: <199607221951.VAA07888@bolyai.cs.elte.hu> <9607221648.ZM3416@morgan.com> <960722145116.ZM10226@candle.brasslantern.com> X-Mailer: Z-Mail (3.2.1 10oct95) To: schaefer@nbn.com, Zoltan Hidvegi , zsh-users@math.gatech.edu Subject: Re: Bug in case stmt with '(' Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"YzncP3.0.nB1.b60zn"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/331 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jul 22, 2:51pm, Bart Schaefer wrote: > Subject: Re: Bug in case stmt with '(' > On Jul 22, 4:48pm, Morris M. Siegel wrote: > } Subject: Re: Bug in case stmt with '(' > } > } Considering the fact that glob patterns in general are supposed to generate > } file names, which usually do not contain blanks > > I dispute that assertion. Ever used a filesystem that's shared with a > Macintosh? I confess not. By the way, has zsh been ported to the Macintosh? or to any non-Unix OS? > } zsh might also ignore > } unescaped whitespace in glob patterns (in general, not just in 'case' > } statements). > > There's no such thing as "unescaped whitespace in glob patterns." Zsh > lexes glob patterns as a STRING token. By the time filename generation > gets around to interpreting the string as a glob pattern, any spaces > that are left MUST have been "escaped" somehow, to make it through the > lexer. Putting parens around the pattern is one such possible quoting. Okay -- (not knowing how lex.c works puts me somewhat at a disadvantage) -- in light of what you say, then what I mean is that the whitespace would have to be escaped with backslash or quotes to be non-trivial. E.g., the glob pattern ( file*.* ~ file.c ) would be equivalent to (file*.*~file.c) and ( ) would be the empty pattern, whereas (my\ file) or 'my file' would each match the 7-character filename 'my file'. -- Morrie Siegel