bin/74282: leading zero for tcsh's %P prompt
Giorgos Keramidas
keramida at freebsd.org
Tue Nov 23 16:30:43 GMT 2004
The following reply was made to PR bin/74282; it has been noted by GNATS.
From: Giorgos Keramidas <keramida at freebsd.org>
To: =?iso-8859-7?Q?Bj=F6rn_K=F6nig?= <bkoenig at cs.tu-berlin.de>
Cc: bug-followup at freebsd.org
Subject: Re: bin/74282: leading zero for tcsh's %P prompt
Date: Tue, 23 Nov 2004 18:25:23 +0200
On 2004-11-23 06:47, Björn König <bkoenig at cs.tu-berlin.de> wrote:
> If you use %P in tcsh's prompt you may get a time format "1:44:39".
> "01:44:39" looks more proper to me.
> for example:
> set prompt = "%P %#"
> >Fix:
> --- src/contrib/tcsh/tc.prompt.c.orig Sun Jul 11 04:17:51 2004
> +++ src/contrib/tcsh/tc.prompt.c Tue Nov 23 06:35:42 2004
> @@ -271,7 +271,7 @@ tprintf(what, buf, fmt, siz, str, tim, i
> what != FMT_PROMPT || adrof(STRnoding)) {
> if (t->tm_min)
> print_prompt_did_ding = 0;
> - p = Itoa(hr, p, 0, attributes);
> + p = Itoa(hr, p, 2, attributes);
> *p++ = attributes | ':';
> p = Itoa(t->tm_min, p, 2, attributes);
> if (*cp == 'p' || *cp == 'P') {
The tcsh shell is maintained outside of the FreeBSD source tree by Christos
Zoylas and other people -- who are very helpful and reasonably responsive
to useful submissions.
Can you post the diff to the maintainers of tcsh? This way, if it's
incorporated into their source tree we can pull the change back in FreeBSD's
source without messing up the import of tcsh :-)
More information about the freebsd-bugs
mailing list