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

Differentiation for symlinks #83

Closed
gibfahn opened this issue Feb 7, 2018 · 2 comments
Closed

Differentiation for symlinks #83

gibfahn opened this issue Feb 7, 2018 · 2 comments

Comments

@gibfahn
Copy link

gibfahn commented Feb 7, 2018

AFAICT symlinks are coloured according to the extension of the link:

LINK target

This makes it difficult to tell from a simple ls whether a file is a symlink, whereas it's a different color in standard color schemes.

What would be ideal would be a format that preserved the color of the extension while adding something else (e.g. underline, inverted colors, or italics, preferably not italics as it doesn't work on many terminals). I understand that may be difficult as underline is already used for .docm .pptxm .pptsm .xlsxm .xltm and LS_COLORS, but it'd make a big difference (at least for me).

LS_COLORS output:

image

gls and ls output on macOS:

image

Orphan links are already highlighted, which is great.

ORPHAN 48;5;196;38;5;232;1

Sorry if this has come up before, couldn't find an issue that mentioned it.

@rpdelaney
Copy link
Collaborator

rpdelaney commented Sep 17, 2018

I haven't looked at this closely but I'm not sure dircolors supports it. If you can figure it out, please send a PR because I don't see a downside.

I'm shocked -- shocked! -- to discover we're using underline for MS Office documents. That makes little sense to me. My terminals or fonts don't support it, I guess.

@gibfahn
Copy link
Author

gibfahn commented Sep 20, 2018

Yeah, looks like you're right, adding support for this would require actually modifying the source for ls, which is not something I have much experience with.

https://github.com/coreutils/coreutils/blob/e5dae2c6b0bcd0e4ac6e5b212688d223e2e62f79/src/ls.c#L350-L362

Thanks for the response though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants