bug(ls): Time Style not accept abbreviated, acronyms
Open
Beginner friendly
Nobody has claimed this yet.
U - ls
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the uu ls time-style argument handling and reproduce the reported TIME_STYLE=posix-local and abbreviated local cases from the issue. Compare the accepted values with GNU ls behavior; done means the abbreviated and acronym forms no longer produce an invalid-argument error and existing checks still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100