[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-mailutils] headline=%d + - alignment broken
From: |
積丹尼 Dan Jacobson |
Subject: |
[bug-mailutils] headline=%d + - alignment broken |
Date: |
Thu, 18 Jan 2018 18:52:19 +0800 |
(info "(mailutils) Mail Variables") is wrong about %+ and %-.
There is no way that they should both act the same here according to the page.
$ LC_TIME=C mail.mailutils --exec='set datefield headline=">%44d< %m [%f] %s
%l/%o"' --headers
>Thu Jan 18 18:19 < 1 [Dan Jacobson] 11/320
$ LC_TIME=C mail.mailutils --exec='set datefield headline=">%+44d< %m [%f] %s
%l/%o"' --headers
> Thu Jan 18 18:19< 1 [Dan Jacobson] 11/320
$ LC_TIME=C mail.mailutils --exec='set datefield headline=">%-44d< %m [%f] %s
%l/%o"' --headers
> Thu Jan 18 18:19< 1 [Dan Jacobson] 11/320
According to the page % should match either %+ or %-, but not both. But
here we see something quite different.
OK now let's try
$ LC_TIME=C mail.mailutils --exec='set datefield headline=">%4d< %m [%f] %s
%l/%o"' --headers
>Thu < 1 [Dan Jacobson] 11/320
$ LC_TIME=C mail.mailutils --exec='set datefield headline=">%+4d< %m [%f] %s
%l/%o"' --headers
>Thu < 1 [Dan Jacobson] 11/320
$ LC_TIME=C mail.mailutils --exec='set datefield headline=">%-4d< %m [%f] %s
%l/%o"' --headers
>Thu < 1 [Dan Jacobson] 11/320
Anyway, if the user wanted
>18:19< 1 [Dan Jacobson] 11/320
he will just have pipe it to sed(1).
P.S., sed works great with --headers, but is not a solution when going
interactive (no --headers).
Anyway the program doesn't act like the Info page says it should.
$ mail --version
mail (GNU Mailutils) 3.4
- [bug-mailutils] headline=%d + - alignment broken,
積丹尼 Dan Jacobson <=