From: Clint Adams <schizo@debian.org>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: more flexible cd builtin
Date: Mon, 13 Dec 1999 16:56:21 -0500 [thread overview]
Message-ID: <19991213165621.A2898@dman.com> (raw)
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;
next reply other threads:[~1999-12-13 21:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-13 21:56 Clint Adams [this message]
1999-12-15 17:09 ` Bart Schaefer
1999-12-15 18:38 ` PATCH: more flexible cd builtin revised Clint Adams
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=19991213165621.A2898@dman.com \
--to=schizo@debian.org \
--cc=zsh-workers@sunsite.auc.dk \
/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).