From owner-freebsd-bugs@FreeBSD.ORG Tue Nov 23 16:30:43 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06EA316A4CE for ; Tue, 23 Nov 2004 16:30:42 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2F3E43D2D for ; Tue, 23 Nov 2004 16:30:42 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iANGUQF6008807 for ; Tue, 23 Nov 2004 16:30:26 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iANGUQtm008806; Tue, 23 Nov 2004 16:30:26 GMT (envelope-from gnats) Date: Tue, 23 Nov 2004 16:30:26 GMT Message-Id: <200411231630.iANGUQtm008806@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Giorgos Keramidas Subject: Re: bin/74282: leading zero for tcsh's %P prompt X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Giorgos Keramidas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 16:30:43 -0000 The following reply was made to PR bin/74282; it has been noted by GNATS. From: Giorgos Keramidas To: =?iso-8859-7?Q?Bj=F6rn_K=F6nig?= 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 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 :-)