Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: more flexible cd builtin
- X-seq: zsh-workers 9028
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: more flexible cd builtin
- Date: Mon, 13 Dec 1999 16:56:21 -0500
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
If the current directory is renamed, zsh's cd will fail because
it's attempting to change to the full path which no longer exists.
This allows one to cd to a subdirectory successfully. This is
incomplete; `pwd` will become correct, but $PWD will not.
Index: Src/builtin.c
===================================================================
RCS file: /cvs/zsh/zsh/Src/builtin.c,v
retrieving revision 1.1.1.44
diff -u -r1.1.1.44 builtin.c
--- Src/builtin.c 1999/12/10 21:40:57 1.1.1.44
+++ Src/builtin.c 1999/12/13 21:51:42
@@ -951,6 +951,7 @@
else
unmetafy(buf, &dlen);
+ if (lchdir(dest, NULL, hard)) /* Try plain relative first */
if (lchdir(buf, NULL, hard)) {
free(buf);
return NULL;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author