mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Color executables in ls(1).
This commit is contained in:
parent
c407a24863
commit
7651519f96
1 changed files with 6 additions and 1 deletions
|
@ -106,9 +106,14 @@ void getentrycolor(const char** pre, const char** post, mode_t mode)
|
|||
{
|
||||
*pre = "";
|
||||
*post = "";
|
||||
if ( colors && S_ISDIR(mode) )
|
||||
if ( !colors )
|
||||
return;
|
||||
if ( S_ISDIR(mode) )
|
||||
*pre = "\e[36m",
|
||||
*post = "\e[37m";
|
||||
else if ( mode & 0111 )
|
||||
*pre = "\e[32m",
|
||||
*post = "\e[37m";
|
||||
}
|
||||
|
||||
int handleentry(const char* path, const char* name)
|
||||
|
|
Loading…
Reference in a new issue