From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3349 invoked from network); 22 Jan 1997 20:49:46 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 22 Jan 1997 20:49:46 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id OAA15673; Wed, 22 Jan 1997 14:55:11 -0500 (EST) Resent-Date: Wed, 22 Jan 1997 14:30:29 -0500 (EST) From: "Bart Schaefer" Message-Id: <970122113559.ZM3128@candle.brasslantern.com> Date: Wed, 22 Jan 1997 11:35:59 -0800 In-Reply-To: Andrej Borsenkow "Re: Help on zsh grammar" (Jan 22, 6:53pm) References: Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.820 20aug96) To: Dietmar Rempfer , borsenkow.msk@sni.de, zsh-users@math.gatech.edu Subject: Re: Help on zsh grammar MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"HK947.0.iI3.Lhcvo"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/621 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Redirected to zsh-users ... On Jan 22, 6:53pm, Andrej Borsenkow wrote: } Subject: Re: Help on zsh grammar } } On Wed, 22 Jan 1997, Dietmar Rempfer wrote: } } > Let us define the following function: } > } > test () { echo \"$*\" } } > } > Now, if I do ``test blabla'', I get "blabla", which is what I want. } > But if I say e.g. ``test *.aux'', I would like to see "*.aux" printed out, } > but instead I get the message: zsh: no matches found: *.aux. You're getting that error before `test' even runs, from the top-level shell that's parsing the command line. `$*' is -not- being globbed inside `test'. } What about } test '*.aux' :-) } } But really, you want } } unsetopt nomatch No, he doesn't. What he wants is test () { echo \"$*\" } alias test 'noglob test' Note that the alias must come after the function definition, or else you define two functions (`noglob' and `test'), both of which do the echo. (You can use `function test () { ... }' instead, but it's still a good idea to always define aliases after defining functions.) -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern