[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] <Happy Dance!>

From: valdis . kletnieks
Subject: Re: [Nmh-workers] <Happy Dance!>
Date: Wed, 16 Aug 2017 15:06:58 -0400

On Wed, 16 Aug 2017 13:31:40 -0400, Ken Hornstein said:
> >Yesterday's small victory:  Replacing  %6(size) in my default scan format
> >with "%(void(size)) %5(divide 1024)k"
> >
> >Now wondering why I didn't do this years ago.. :)
> And when 1.7 comes out, you can use %(kilo) or %(kibi)! :-)

Actually, could use that now, I've been using a git tree copy for quite some
time now... :)

Hadn't noticed kilo/kibi even better.  Ended up with %-7(kibi(size)).  Which 
me to discover:

man mh-format says:

       When a function or component escape is interpreted and the result  will
       be  printed  immediately,  an  optional field width can be specified to
       print the field in exactly a given number of characters.  For  example,
       a  numeric escape like %4(size) will print at most 4 digits of the mes?
       sage size; overflow will be indicated by a `?' in  the  first  position
       (like  `?234').   A  string  escape  like %4(me) will print the first 4
       characters and truncate at the end.  Short fields  are  padded  at  the
       right  with the fill character (normally, a blank).

We don't mention that negative values left-pad.

Attachment: pgpBERE9d08oP.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]