From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2986 invoked from network); 4 Dec 1996 09:16:00 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 4 Dec 1996 09:16:00 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA02348; Wed, 4 Dec 1996 04:01:06 -0500 (EST) Resent-Date: Wed, 4 Dec 1996 04:01:06 -0500 (EST) Message-Id: <199612040900.KAA20985@sgi.ifh.de> X-Authentication-Warning: sgi.ifh.de: Host pws@localhost didn't use HELO protocol To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: bug with empty path In-reply-to: "Zoltan Hidvegi"'s message of "Tue, 03 Dec 1996 17:57:58 MET." <199612031657.RAA25108@bolyai.cs.elte.hu> Date: Wed, 04 Dec 1996 10:00:21 +0100 From: Peter Stephenson Resent-Message-ID: <"rtyvK1.0.aa.HtJfo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2532 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Zoltan Hidvegi wrote: > Peter Stephenson wrote: > > The lines: > > path=() > > and > > PATH= > > have different effects: the first produces an empty path array, the > > second a path with one blank element. This turns up in the following: > > I do not think it is a bug. Of course other shells couldn't set an empty > path but zsh is better than that. The path is really an array and the PATH > scalar is just a representation which has this inefficiency. > > One may want to use a really empty path sometimes which is best achieved > with path=(). I see the point, but do you really want to try and explain this to the average user? ``The PATH is sometimes empty, and sometimes really empty, but only if you set it as an array; if it looks empty, it may be empty or really empty; if it's empty but not really empty it pretends to be set to the current directory...'' Besides which, when passed as an environment variable --- even down to another zsh --- the only possibilities are either not having it set or an empty PATH (which is therefore not really empty in the above sense). Still, there's some confusion in having both $path and $PATH which is probably unavoidable, so I can live with it. -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77413 Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.