Skip to content

bug(ls): Time Style not accept abbreviated, acronyms #14730

Description

@HackingRepo

Hi, uutils mainteners

we saw that in our test

relunsec@relunsec:~/software/coreutils/target/debug$ TIME_STYLE=$'posix-local' ./ls -lah 
ls: invalid --time-style argument 'local'
Possible values are:
  - [posix-]full-iso
  - [posix-]long-iso
  - [posix-]iso
  - [posix-]locale
  - +FORMAT (e.g., +%H:%M) for a 'date'-style format

For more information try --help
relunsec@relunsec:~/software/coreutils/target/debug$ 
relunsec@relunsec:~/software/coreutils/target/debug$ TIME_STYLE=$'posix-local' gnuls -lah | head -c 1000
total 3.2G
drwxrwxr-x   7 relunsec relunsec  463 Sep 19 12:15 .
drwxrwxr-x   4 relunsec relunsec    7 Aug  9 08:41 ..
-rw-rw-r--   1 relunsec relunsec    0 Aug  9 08:38 1o6iHq6D6FKsl7187mIs65fv8LQirsHfB
-rw-rw-r--   2 relunsec relunsec    3 Aug 11 03:42 a
-rwxr-xr-x   1 relunsec relunsec    3 Aug  9 09:44 a@
-rw-rw-r--   1 relunsec relunsec    3 Aug  9 09:44 a~
-rwxrwxr-x   2 relunsec relunsec  77M Aug  9 06:44 arch
-rw-rw-r--   1 relunsec relunsec  13K Aug  9 06:45 arch.d
-rw-rw-r--   1 relunsec relunsec    0 Sep 18 12:12 a.txt
-rw-rw-r--   2 relunsec relunsec    3 Aug 11 03:42 b
-rwxrwxr-x   2 relunsec relunsec  81M Aug  9 06:45 b2sum
-rw-rw-r--   1 relunsec relunsec  13K Aug  9 06:45 b2sum.d
-rwxrwxr-x   2 relunsec relunsec  79M Aug  9 06:45 base32
-rw-rw-r--   1 relunsec relunsec  13K Aug  9 06:45 base32.d
-rwxrwxr-x   2 relunsec relunsec  79M Aug  9 06:45 base64
-rw-rw-r--   1 relunsec relunsec  13K Aug  9 06:45 base64.d
-rwxrwxr-x   2 relunsec relunsec  77M Aug  9 06:44 basename
relunsec@relunsec:~/software/coreutils/target/debug$ 

uu ls expects fully posix-locale it is common to miss the e, and just local, so that will break some scripts that rely on abbreviated time styles

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions