ls: Add colored output for set-gid files

This commit is contained in:
Brendan Coles 2020-11-02 06:31:17 +00:00 committed by Andreas Kling
parent 5e164052f6
commit 88307fcb59
Notes: sideshowbarker 2024-07-19 01:35:26 +09:00

View file

@ -194,6 +194,8 @@ static size_t print_name(const struct stat& st, const String& name, const char*
begin_color = "\033[42;30;1m";
else if (st.st_mode & S_ISUID)
begin_color = "\033[41;1m";
else if (st.st_mode & S_ISGID)
begin_color = "\033[43;1m";
else if (S_ISLNK(st.st_mode))
begin_color = "\033[36;1m";
else if (S_ISDIR(st.st_mode))