On 29/12/2019 19:58, Mike Miller wrote:
On 2019-12-28 08:15, Pádraig Brady wrote:
Often TIME_STYLE is configured in an env var,
so we'd probably have to have a separate var to
config that, which isn't ideal.
I wonder could we auto set the "recent" limit
based on the resolution of the format provided?
I.E. If you specify %a, use a week as the recent threshold?
>
Thanks. I think that could work, though it would probably surprise people.
This led me to thinking, what about another parameter to the time-style param?
Looks like it is currently newline delimited. Perhaps a third line could hold a
time threshold? A bit odd (due to delimiter) but compact in terms of variables
and backwards compatible.
I did consider that, but unfortunately a
subsequent line is currently disallowed rather than ignored:
$ \ls -l --time-style=$'+%Y\n%d\n12345'
ls: invalid time style format ‘%Y\n%d\n12345’
cheers,
Pádraig