zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: more flexible cd builtin
@ 1999-12-13 21:56 Clint Adams
  1999-12-15 17:09 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Clint Adams @ 1999-12-13 21:56 UTC (permalink / raw)
  To: zsh-workers

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;


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-12-15 18:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-13 21:56 PATCH: more flexible cd builtin Clint Adams
1999-12-15 17:09 ` Bart Schaefer
1999-12-15 18:38   ` PATCH: more flexible cd builtin revised Clint Adams

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).