Date: Tue, 23 Nov 2004 16:30:26 GMT From: Giorgos Keramidas <keramida@freebsd.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/74282: leading zero for tcsh's %P prompt Message-ID: <200411231630.iANGUQtm008806@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/74282; it has been noted by GNATS. From: Giorgos Keramidas <keramida@freebsd.org> To: =?iso-8859-7?Q?Bj=F6rn_K=F6nig?= <bkoenig@cs.tu-berlin.de> Cc: bug-followup@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@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 :-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411231630.iANGUQtm008806>