The following reply was made to PR bin/89410; it has been noted by GNATS.

From: [email protected] (dfilter service)
To: [email protected]
Cc:  
Subject: Re: bin/89410: commit references a PR
Date: Wed,  3 Mar 2010 16:06:52 +0000 (UTC)

 Author: jh
 Date: Wed Mar  3 16:06:43 2010
 New Revision: 204637
 URL: http://svn.freebsd.org/changeset/base/204637
 
 Log:
   MFC r204276:
   
   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
 
 Modified:
   stable/8/bin/sh/parser.c
 Directory Properties:
   stable/8/bin/sh/   (props changed)
 
 Modified: stable/8/bin/sh/parser.c
 ==============================================================================
 --- stable/8/bin/sh/parser.c   Wed Mar  3 15:43:26 2010        (r204636)
 +++ stable/8/bin/sh/parser.c   Wed Mar  3 16:06:43 2010        (r204637)
 @@ -1631,7 +1631,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++)
 _______________________________________________
 [email protected] mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "[email protected]"
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to