From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7132 invoked from network); 22 Jul 1997 16:16:38 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 22 Jul 1997 16:16:38 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id MAA05546; Tue, 22 Jul 1997 12:11:39 -0400 (EDT) Resent-Date: Tue, 22 Jul 1997 12:11:07 -0400 (EDT) From: "Bart Schaefer" Message-Id: <970722091033.ZM14730@candle.brasslantern.com> Date: Tue, 22 Jul 1997 09:10:33 -0700 In-Reply-To: <199707220823.JAA20676@taos.demon.co.uk> Comments: In reply to Andrew Main "Re: delay argument interpretation" (Jul 22, 9:23am) References: <199707220823.JAA20676@taos.demon.co.uk> X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-users@math.gatech.edu Subject: Re: delay argument interpretation MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"K5ghJ.0.zL1.QkDrp"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/963 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, 9:23am, Andrew Main wrote: > Subject: Re: delay argument interpretation > > Bart Schaefer wrote: > > show () { > > show=() > > show=($~*) > > print -rc $show > > } > > alias show='noglob show' > > Why? What's wrong with > > function show { > show=("$@") > print -rc -- "$@" > } The latter fails to set $show to empty when the pattern doesn't match anything. I have nomatch set, so if there's a globbing failure in the arg list, "show" never executes. I want to force "show" to start, and *then* get the globbing failure. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com