* Small problem with CDPATH processing in 3.1.0
@ 1997-01-17 7:47 Stephen McKay
0 siblings, 0 replies; only message in thread
From: Stephen McKay @ 1997-01-17 7:47 UTC (permalink / raw)
To: zsh-workers; +Cc: mckay
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-01-17 7:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-01-17 7:47 Small problem with CDPATH processing in 3.1.0 Stephen McKay
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).