Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: zsh-3.1.2-zefram3: 12 hour clock in prompts

Andrew Main wrote:
> ztrftime() is disgusting.  I'd really like to strip it down to what POSIX
> requires date(1) to handle (and make it really POSIX conformant) -- to
> hell with existing users, it's used almost purely for prompts.  Then do
> what should have been done with strftime() from the start: add flags to
> the % sequences to specify the type of fill.  What do people think?

I don't think it's really long enough to worry about.  We can only
ended up re-implementing the whole of strftime(), which is even more
to worry about.  It would have been nice to have had fills handled properly,
but that's too late to do in any kind of compatible way.  Also, every
time something in zsh gets stripped down it's usually the bits I was
using that disappear (unless I'm doing it myself).  I use print -P
sometimes to format dates and times and it's inconvenient to find out
bits of the system's strftime() are not implemented (some date's don't
take +fmt).

Peter Stephenson <pws@xxxxxx>       Tel: +39 50 911239
WWW:  http://www.ifh.de/~pws/
Gruppo Teorico, Dipartimento di Fisica
Piazza Torricelli 2, 56100 Pisa, Italy

Messages sorted by: Reverse Date, Date, Thread, Author