lsd-rs / lsd-rs/lsd

⇒ as field separator for symlinks breaks ls compatibility

Open Beginner friendly
#1,204 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
16.2k
Forks
510
PR merge metrics
No merged PRs in 30d

Description

  • os: Linux
  • lsd --version: lsd 1.1.5
  • echo $TERM:
  • echo $LS_COLORS:

Expected behavior

As is implemented by ls and mandated by POSIX, when using the -l option, symbolic links are shown like:
<pathname_of_link> -> <contents_of_link>

Actual behavior

With lsd, symbolic links are always shown like:
<pathname_of_link> <contents_of_link>

Suggestions

Although it is admittedly a bad idea to rely on ls output, some portable scripts (prior to POSIX 2024 which standardized realpath/readlink) do to determine symlinks.

Suggestion: Replace with -> as the separator for symlinks, either always (much simpler that way), or at least when standard output isn't a terminal, and in any case always when invoked with --classic.

Contributor guide

No contributing guide indexed for this repository

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 at the lsd -l symlink-output entry point and inspect how the separator is selected, including the --classic and non-terminal cases described in the issue. Run lsd -l against symbolic links to compare the current output with the expected -> separator; done means the requested compatibility behavior is covered.

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
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.