Date: Wed, 24 Feb 2010 14:30:03 GMT From: dfilter@FreeBSD.ORG (dfilter service) To: freebsd-bugs@FreeBSD.org Subject: Re: bin/89410: commit references a PR Message-ID: <201002241430.o1OEU3PC058851@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/89410; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@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@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002241430.o1OEU3PC058851>