Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: 3.1.6: Extra slash in $PWD (Re: prompt bug?)
- X-seq: zsh-workers 8123
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx, Gabor <gabor@xxxxxxxxxx>
- Subject: PATCH: 3.1.6: Extra slash in $PWD (Re: prompt bug?)
- Date: Sun, 3 Oct 1999 05:06:26 +0000
- In-reply-to: <19990926173658.A352@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19990926173658.A352@xxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author