From: Peter Stephenson <pws@ifh.de>
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: bug with empty path
Date: Mon, 25 Nov 1996 15:33:28 +0100 [thread overview]
Message-ID: <199611251433.PAA22472@hydra.ifh.de> (raw)
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:
% cd /usr/bin
% PATH=
% ls
<listing>
% path=()
% ls
zsh: command not found: ls
which doesn't strike me as right; both should use the current
directory if there is no path. The only `nice' way I can see of doing
it (without messing the arrays around) is handling a totally empty
path the same way as a path with a single blank element.
*** Src/exec.c.path Mon Nov 25 15:26:47 1996
--- Src/exec.c Mon Nov 25 15:28:12 1996
***************
*** 331,336 ****
--- 331,341 ----
if (isgooderr(ee, *nn ? nn : "/"))
eno = ee;
}
+ if (!*path) {
+ ee = zexecve(arg0, argv);
+ if (isgooderr(ee, ""))
+ eno = ee;
+ }
for (pp = path; *pp; pp++)
if (!(*pp)[0] || ((*pp)[0] == '.' && !(*pp)[1])) {
ee = zexecve(arg0, argv);
--
Peter Stephenson <pws@ifh.de> 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.
next reply other threads:[~1996-11-25 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-25 14:33 Peter Stephenson [this message]
1996-12-03 16:57 ` Zoltan Hidvegi
1996-12-04 9:00 ` Peter Stephenson
1996-12-04 20:59 ` Zoltan Hidvegi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199611251433.PAA22472@hydra.ifh.de \
--to=pws@ifh.de \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).