Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Targets of symbolic links should be highlighted as individual files #760

Open
UrsaDK opened this issue Nov 2, 2022 · 1 comment
Open
Labels
kind/enhancement Enhancement on current feature

Comments

@UrsaDK
Copy link

UrsaDK commented Nov 2, 2022

Current behaviour was observed across the following systems:

- os: macOS 12.6
- `lsd --version`: lsd 0.23.1
- `echo $TERM`: xterm-256color
- `echo $LS_COLORS`: fi=0:ex=1;32:su=1;4;32:sg=1;4;32:di=1;34:st=1;34:tw=1;4;34:ow=1;4;34:ln=1;36:or=1;4;36:mi=1;31:pi=35:bd=1;35:cd=1;35:so=1;35
- os: Alpine Linux edge (3.17_alpha20220715)
- `lsd --version`: lsd 0.23.1
- `echo $TERM`: xterm
- `echo $LS_COLORS`: fi=0:ex=1;32:su=1;4;32:sg=1;4;32:di=1;34:st=1;34:tw=1;4;34:ow=1;4;34:ln=1;36:or=1;4;36:mi=1;31:pi=35:bd=1;35:cd=1;35:so=1;35

Expected behaviour

When doing a long list of files in a directory (ls -l) GNU ls uses mi attribute of LS_COLORS to highlight an invalid target of a link. For valid links, the target is highlighted as per LS_COLORS, as if it was just another directory item.

This makes it very easy to identify what kind of item the link is pointing to, eg: a normal file, a socket, a directory, or another symlink.

It would be nice if lsd followed the same highlighting pattern.

Actual behaviour

lsd behaves correctly when highlighting invalid links target, ie: it follows the colours defined for mi in LS_COLORS. However, a target of a valid link is always highlighted as a link (ln in LS_COLORS), irrespective of what item the link is actually pointing to.

Screenshot 2022-11-02 at 11 04 22

@meain meain added the kind/enhancement Enhancement on current feature label Nov 3, 2022
@strahlc
Copy link

strahlc commented Mar 7, 2023

+1
This would be a very nice enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Enhancement on current feature
Projects
None yet
Development

No branches or pull requests

3 participants