coreutils
[Top][All Lists]
Advanced

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

Re: ls -l --time-style, configure recent interval


From: Pádraig Brady
Subject: Re: ls -l --time-style, configure recent interval
Date: Mon, 30 Dec 2019 14:32:15 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:70.0) Gecko/20100101 Thunderbird/70.0

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



reply via email to

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