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 melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id FAA23976 for ; Tue, 11 Jun 1996 05:51:27 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id PAA00110; Mon, 10 Jun 1996 15:40:10 -0400 (EDT) Resent-Date: Mon, 10 Jun 1996 15:40:10 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960610124103.ZM21202@candle.brasslantern.com> Date: Mon, 10 Jun 1996 12:41:01 -0700 In-Reply-To: Hrvoje Niksic "Re: [ -z $FOO ] seems broken in beta13" (Jun 10, 7:18pm) References: <7884.199606101703@stone.dcs.warwick.ac.uk> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.607 07jun96) To: zsh-workers@math.gatech.edu (ZSH Workers Mailing List) Subject: Re: [ -z $FOO ] seems broken in beta13 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"BtRo_1.0.d1.Qe7ln"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1321 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jun 10, 7:18pm, Hrvoje Niksic wrote: } Subject: Re: [ -z $FOO ] seems broken in beta13 } } Zefram (A.Main@dcs.warwick.ac.uk) wrote: } > } > >I use [ -z $TERM ] to check for terminal settings, and since we revved up } > >from 2.5, I'm now forced to use $+TERM. } > > } > >Now I get "argument expected". Is this correct? } > } > Yes. If $TERM is empty, then $TERM will be removed from the command } > line completely, leaving `[ -z ]`, which is a syntax error. If you use } > "$TERM" (note the quotes), then the result will be `[ -z "" ]`, which } > is legal. } } I thought you got this behaviour only by turning on shwordsplit? Probably that was true at one time. In any case, it would be nice to be able to get a Bourne-shell-compatible "test" as well as a POSIX-compatible "test". As demonstrated here before, bash appears to use the POSIX semantics, but sh and ksh use the "argument expected" semantics quoted above. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern New male in /home/schaefer: >N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"