Date: Tue, 23 Nov 2004 06:47:16 +0100 (CET) From: Björn König <bkoenig@cs.tu-berlin.de> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/74282: leading zero for tcsh's %P prompt Message-ID: <20041123054716.0532C623C@mail.alpha-tierchen.de> Resent-Message-ID: <200411230550.iAN5oCO5033317@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 74282 >Category: bin >Synopsis: leading zero for tcsh's %P prompt >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Nov 23 05:50:12 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Björn König >Release: not relevant >Organization: >Environment: not relevant >Description: 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. >How-To-Repeat: 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') { >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041123054716.0532C623C>