uutils / uutils/coreutils

ls: Compatibility Tracking Issue

Open
#1,872 24 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - ls
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

I've made an overview of all options that need to be added and defaults that need to be changed in ls to reach full compatibility with GNU ls. I hope this might help people out who want to contribute, without adding to many issues to the issue list.

The items marked with 1️⃣ are the ones I think make Good First Issues.

  • Formats
    • -x & --format=across & --format=horizontal
    • -m & --format=commas
    • Make -n overrideable (similar to -o and -g)
  • Date & time
    • --time=birth & --time=creation
    • --time-style=full-iso
    • --time-style=long-iso
    • --time-style=iso
    • --time-style=locale (works, but not locale-specific yet)
    • --time-style=+FORMAT like in date
    • posix- prefix for --time-style
    • --full-time
    • Default: follow environment variable TIME_STYLE or locale
  • Escaping and quoting
    • -b. --escape& --quoting-style=escape
    • -Q, --quote-name & --quoting-style=c
    • -N, --literal & --quoting-style=literal
    • --quoting-style=shell & --quoting-style=shell-always
    • --quoting-style=shell-escape & --quoting-style=shell-escape-always
    • --quoting-style=locale
    • --quoting-style=clocale
    • Default: follow environment variable QUOTING_STYLE or shell-escape.
    • Space in front of file names without quotes if there are names with quotes.
  • Control characters
    • -q & --hide-control-characters
    • --show-control-characters
    • Set default to -q if the output is a terminal.
  • Sorting
    • -U & --sort=none
    • -v & --sort=version (also used in sort, so might make sense to put this in uucore)
    • -X & --sort=extension
    • Make sorting by name locale-specific (currently only C-locale is implemented). Among other problems, this causes a behaviour where hidden files (prefixed with ".") are sorted before other files, instead of the leading "." being ignored.
    • 1️⃣ --group-directories-first
    • -f (enable -aU, disable -ls --color)
  • Dereferencing
    • -H & --dereference-command-line
    • --dereference-command-line-symlink-to-dir
  • Hiding
    • --hide
    • -I & --ignore
  • Indicator style
    • --indicator-style with options: none, slash, file-type, classify
    • -p (equivalent to --indicator-style=slash)
    • --file-type (equivalent to --indicator-style=file-type)
  • Block size (these should mainly be implemented in uucore, since they are used by multiple programs)
    • -s & --size
    • -k & --kibibytes (equivalent to --block-size=1K)
    • --block-size
    • Default: Determine block size from environment variables.
  • Loose ends: The options that didn't fit into the categories above
    • -w & --width
    • -T & --tabsize ( #7616 )
    • -Z & --context
    • -D & --dired
    • --hyperlink
    • Show total size of directories in the long format

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.

Research direction

Start by reviewing the unchecked entries in the ls compatibility checklist and the existing ls implementation and tests. Choose one narrowly scoped item, compare its behavior with GNU ls, and consider it done when the option or default is implemented and covered by matching tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.