color of symbolic link and color + icon of link target
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.2k
- Forks
- 510
- PR merge metrics
- No merged PRs in 30d
Description
hi,
i am using lsdeluxe for years now (thank you).
as an excercise, i have started to reprogram lsd in c by using lsd's output as a reference. having gone into details, i have noticed, that gnu ls is showing more information than lsd when it comes to links. from lsd, i kinda would have expected the output of my own solution, see the screenshots below.
as far as i understand, this is the same topic like [this isue 760.](https://github.com/lsd-rs/lsd/issues/760).
you can find my project [here](https://gitlab.com/oli79/ls). it should compile on linux without any dependencies other than the gnu libraries. mind it is a work in progress.
# Expected behaviour on linux from lsd
(i have worded out the screen shots below, probably rather useless, but i tried to follow the form.)
(red) [link icon] dead link --> (red) [icon] dangling link target
(bold green) [dir link icon] link to dir --> (bol blue) [dir icon] link target dir
(bold green) [dir link icon] link to public dir --> (blue on green) [dir icon] link target dir
(bold green) [file link icon] link to file --> (color according to file extension) [file icon] link target file
(bold green) [file link icon] link to pipe --> (orange?) [pipe icon] link target pipe
(bold green) [file link icon] link to socket --> (bold magenta?) [pipe socket] link target socket
(bold green) [file link icon] link to char device --> (bold yellow) [char dev icon] link target character device
# Actual behaviour on linux of lsd
(bold green) [icon] dead link --> (white) [no icon] dagling link target
(bold green) [dir or file icon] any other symbolic link --> (bold green) [no icon] any other link target
# Comparison of screenshots of gnu ls, lsd and my implementation for some test files on linux
below is an example for the listing of my test symbolic links.
please ignore the "_private_dir" and "_public_dir" entries.
## lsdeluxe
any symbolic link has the "dark green" link color. the information content is hence lower than the one of the gnu ls.

## my own implementation
the symbolic link and the link target have the "correct color", and the link and the link target show the "correct" icon.
in order to add more information to the listing, i have colored the 'l' at the start of the line in accordance with the color of the link target.
note that the "Wood.bmp" is not supposed to be white and the icon is the generic "file icon". i have not yet implemented neither the color nor the icon based on file extensions.

## gnu ls
the symbolic link and the link target have the "correct color".

Contributor guide
No contributing guide indexed for this repository
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 by reviewing issue 760 and the current Linux symlink rendering behavior in lsd. Compare the existing output with the GNU ls examples and the expected cases listed here, including dangling links and targets that are directories, files, pipes, sockets, or devices. Done means the link and its target show the appropriate colors and icons on Linux.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100