ogham / exa

A modern replacement for ‘ls’.
https://the.exa.website/
MIT License
23.45k stars 658 forks source link

Allow Directory Permissions to use Different Color Values than File Permissions #1232

Open RyanPrussin opened 11 months ago

RyanPrussin commented 11 months ago

My personal exa color philosophy is to try to keep colors toned-down and relatively balanced and complementary UNLESS it is meant to warn you loudly about something you should be focused on, in which case louder colors are okay.

To that end, one of the things I realized is that it can be really helpful to identify when file and directory permissions are not restrictive enough by identifying them with bright popping colors, like red, e.g.:

image

As a developer, I would love the ability to set different colors for the permissions on directories than I do for the permissions on files, because it can help draw my attention to permissions that need to be changed to improve security.

For example, in PHP it is generally recommended for directories to have 755 permissions (-rwx--x--x) and for files to have 644 permissions (-rw-r--r--). I would love to make it so that all of the the undesired permission settings for directories (----rw-rw-) and for files (---x-wx-wx) could be flagged as red so I see them immediately. Currently if I try to do that, I either have to cater to files and then see lots of red for directories, or cater to directories and see lots of red for files.

If these colors could be set separately it could become a really helpful tool for taking note of security issues when coding.