8000 Implement `TIME_STYLE="+DATE" ls` · Issue #3625 · uutils/coreutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Implement TIME_STYLE="+DATE" ls #3625
Closed
@sylvestre

Description

@sylvestre

We already support TIME_STYLE as an environment variable but only with the 4 different values.
GNU allows the use of +date

For example:

$ touch exe
$ TIME_STYLE="+%Y__%S" ls exe -al
-rw-r--r-- 1 sylvestre sylvestre 0 2022__58 exe
$ TIME
65CC
_STYLE="+%Y-%m-%d %H:%M:%S.%N %z" ls exe -al
-rw-r--r-- 1 sylvestre sylvestre 0 2022-06-13 21:34:58.728327312 +0200 exe
$ TIME_STYLE="+foobar" ls exe -al
-rw-r--r-- 1 sylvestre sylvestre 0 foobar exe

GNU supports the date format (like the date or touch commands)
https://github.com/uutils/coreutils/blob/main/src/uu/date/src/date.rs
https://github.com/uutils/coreutils/blob/main/src/uu/touch/src/touch.rs

Tests in:
https://github.com/coreutils/coreutils/blob/master/tests/ls/color-term.sh#L23=

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0