積丹尼 Dan Jacobson
2018-01-18 10:52:19 UTC
(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
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
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
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"' --headersThu Jan 18 18:19< 1 [Dan Jacobson] 11/320
$ LC_TIME=C mail.mailutils --exec='set datefield headline=">%-44d< %m [%f] %s %l/%o"' --headersThu Jan 18 18:19< 1 [Dan Jacobson] 11/320
According to the page % should match either %+ or %-, but not both. Buthere 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"' --headersThu < 1 [Dan Jacobson] 11/320
$ LC_TIME=C mail.mailutils --exec='set datefield headline=">%-4d< %m [%f] %s %l/%o"' --headersThu < 1 [Dan Jacobson] 11/320
Anyway, if the user wanted18: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