-
Notifications
You must be signed in to change notification settings - Fork 643
feat: add support for highlighting by file type #510
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
Conversation
|
Thank you for the PR! I have some change requests:
|
|
Should we move the
Checking if it's not a directory should be enough right? |
Nope, I mean you can use something like Also we don't need to check |
|
I can't wait to release v0.2.0, let me finish the next work of this PR! 😆 |
Alright, no problem.
Well, if we don't check |
8b54da3 to
daa696b
Compare
daa696b to
339787e
Compare
|
I added some other filetypes support, let's merge it then. |
|
Docs added here https://yazi-rs.github.io/docs/configuration/theme#filetype |
|
Thank you very much, guys, for this excellent addition and for closing my original issue with it. Just noticed the following:
With (which does not make sense for folders) all linked folders a colored as executables. If you set the color codes for exec files below linked files and folders, everything works correctly: Not quite sure whether this is a tiny issue. Thank a lot! |
|
Hey @Brixy, I'm not quite sure if I understand your meaning. Which files do you want to highlight, and which files do you not want to highlight at the same time? |
With the complete setting posted above everything works as expected. So, there is no real problem. I just noticed that If you use all symbolic links are green, i.e. marked as executables -- although the links lead to non-executable files and folders. Maybe yazi qualifies links as exec files in general?! Please ask back if I did not make this clear. I am not sure whether this is an issue anyway. |
|
|
|
I think I understand what you're saying, but it's not that links take precedence over executable files; in fact, they coexist. Let's say:
I think this makes sense; when a file is a "link" pointing to an "executable", users can choose to present it either as a "link" or as an "executable" file. |
|
Thanks a lot for your commit and your answers!
Yes, totally 😀 Please allow one last question -- which is a shortform of my clumsy initial question. If you have I would expect the orphan |
|
Yeah this is as expected, orphan files (or link files themselves) in Linux are files with special properties that have both I think we should follow this convention, separating the |
👍 Oh sorry. I did’t Thanks for your patience! |
Closes #262
This adds support for highlighting executable files and symlinks.
Docs: https://yazi-rs.github.io/docs/configuration/theme#filetype