* PATCH: 3.1.6: Extra slash in $PWD (Re: prompt bug?)
[not found] <19990926173658.A352@vmunix.com>
@ 1999-10-03 5:06 ` Bart Schaefer
0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 1999-10-03 5:06 UTC (permalink / raw)
To: zsh-workers, Gabor
On Sep 26, 5:36pm, Gabor wrote:
} Subject: prompt bug?
}
} I discovered this interesting anomoly in my prompt
}
} PS1='=== %(3/;%2/;%/) $ '
} === //tmp $
I'm still hoping to have a more detailed look at "cd" and friends, but
this was quick'n'dirty. Line numbers may be off a tad.
Index: Src/builtin.c
===================================================================
@@ -963,7 +963,8 @@
buf = ztrdup(dest);
else {
dlen = strlen(pwd);
-
+ if (pwd[dlen-1] == '/')
+ --dlen;
buf = zalloc(dlen + strlen(dest) + 2);
strcpy(buf, pwd);
buf[dlen] = '/';
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-10-03 5:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <19990926173658.A352@vmunix.com>
1999-10-03 5:06 ` PATCH: 3.1.6: Extra slash in $PWD (Re: prompt bug?) Bart Schaefer
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).