MAC .bash_profile: change directory string colors and file names by type [closed]
-
26-06-2021 - |
Вопрос
I am not sure if this is even possible I search in google but looks like I am not using the correct search string. How can we change the display color of directory strings, files etc.
Example: when we do ls, command can we change the .bash_profile script to show Directories in Red and Files in yellow? further more can we change file colors based on file type?
Решение
Yes you can. Use
export CLICOLOR=true
to turn on the colors in ls
and something like
export LSCOLORS=gxfxcxdxbxegedabagacad
to customize the colors per type of file.
Type
man ls
for an explanation of how LSCOLORS
work.
Не связан с StackOverflow