Skip to content

ls: Compatibility Tracking Issue #1872

Description

@tertsdiepraam

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions