bin/89410: commit references a PR
dfilter service
dfilter at FreeBSD.ORG
Wed Feb 24 14:30:04 UTC 2010
The following reply was made to PR bin/89410; it has been noted by GNATS.
From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: bin/89410: commit references a PR
Date: Wed, 24 Feb 2010 14:20:10 +0000 (UTC)
Author: jh
Date: Wed Feb 24 14:19:56 2010
New Revision: 204276
URL: http://svn.freebsd.org/changeset/base/204276
Log:
Fix expansion of \W in prompt strings when the working directory is "/".
The prompt string was truncated after \W when the working directory was "/".
PR: bin/89410
Submitted by: Dr Balwinder Singh Dheeman
MFC after: 1 week
Modified:
head/bin/sh/parser.c
Modified: head/bin/sh/parser.c
==============================================================================
--- head/bin/sh/parser.c Wed Feb 24 13:13:29 2010 (r204275)
+++ head/bin/sh/parser.c Wed Feb 24 14:19:56 2010 (r204276)
@@ -1641,7 +1641,7 @@ getprompt(void *unused __unused)
case 'w':
ps[i] = '\0';
getcwd(&ps[i], PROMPTLEN - i);
- if (*fmt == 'W') {
+ if (*fmt == 'W' && ps[i + 1] != '\0') {
/* Final path component only. */
trim = 1;
for (j = i; ps[j] != '\0'; j++)
_______________________________________________
svn-src-all at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
More information about the freebsd-bugs
mailing list