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

Open Beginner friendly
#14,730 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
cli

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.

Description

U - ls

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

Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 4h
Merged PRs (30d)
371

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uutils/coreutils

All issues in uutils/coreutils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.