From: Stephen McKay <syssgm@devetir.qld.gov.au>
To: zsh-workers@math.gatech.edu
Cc: mckay@thehub.com.au
Subject: Small problem with CDPATH processing in 3.1.0
Date: Fri, 17 Jan 1997 17:47:20 +1000 [thread overview]
Message-ID: <199701170747.RAA23494@ogre.devetir.qld.gov.au> (raw)
I noticed a problem with CDPATH in zsh 3.0.1, and have verified that it is
still a problem in zsh 3.1.0 that I just fetched from ftp.ips.oz.au.
If you are in directory "/a" and "/a/b" exists and CDPATH=".:/foo" then
"cd b" works and does not print the new path. If "/foo/c" exists then
"cd c" works and prints the new path "/foo/c".
If CDPATH=":/foo" this should work the same, but it does not. Instead,
"cd b" "/a/b" to be printed. Following is a suggested patch to zsh 3.1.0
to fix this. It should apply to earlier versions also.
By the way, CDPATH="/foo" also works, but will not be well received by
/bin/sh (at least under Solaris). It seems foolish for zsh to differ in this
way from /bin/sh and it caused me a little trouble with failing shell scripts
before I tracked it down.
Please note that I have not joined the list, so if you want me to see any
replies, you will have to mail me directly.
*** builtin.c.dist Sat Dec 21 11:22:26 1996
--- builtin.c Fri Jan 17 17:31:49 1997
***************
*** 1159,1165 ****
if (!nocdpath)
for (pp = cdpath; *pp; pp++) {
if ((ret = cd_try_chdir(*pp, dest))) {
! if (strcmp(*pp, ".")) {
doprintdir++;
}
return ret;
--- 1159,1165 ----
if (!nocdpath)
for (pp = cdpath; *pp; pp++) {
if ((ret = cd_try_chdir(*pp, dest))) {
! if (**pp && strcmp(*pp, ".")) {
doprintdir++;
}
return ret;
Cheers,
Stephen.
reply other threads:[~1997-01-17 7:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=199701170747.RAA23494@ogre.devetir.qld.gov.au \
--to=syssgm@devetir.qld.gov.au \
--cc=mckay@thehub.com.au \
--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).