°Zsh: Add some LS_COLORS
This commit is contained in:
parent
d42c5cb8bd
commit
c9f68da170
@ -133,6 +133,26 @@ elif command -v xterm > /dev/null; then
|
||||
export TERMINAL="xterm"
|
||||
fi
|
||||
|
||||
# Add some nice colors to ls output
|
||||
function _gen_lscolor()
|
||||
{
|
||||
local color="${1}"
|
||||
shift
|
||||
local -a extensions=("${@}")
|
||||
|
||||
for ext in ${extensions}; do
|
||||
print -n ":*.${ext}=${color}"
|
||||
done
|
||||
}
|
||||
LS_COLORS="${LS_COLORS}$(_gen_lscolor "38;5;176" cpp cxx c++ c)"
|
||||
LS_COLORS="${LS_COLORS}$(_gen_lscolor "38;5;110" hpp hxx h++ h)"
|
||||
LS_COLORS="${LS_COLORS}$(_gen_lscolor "38;5;184" webp png jpg jpeg gif svg xcf)"
|
||||
LS_COLORS="${LS_COLORS}$(_gen_lscolor "38;5;172" flac opus ogg oga mp3 m4a wav mid mod wma ac3 au)"
|
||||
LS_COLORS="${LS_COLORS}$(_gen_lscolor "38;5;172" mkv webm ogv mp4 m4v avi mpeg mpg wmv flv mov 3gp)"
|
||||
LS_COLORS="${LS_COLORS}$(_gen_lscolor "38;5;184" m3u m3u8 pls)"
|
||||
export LS_COLORS
|
||||
unfunction _gen_lscolor
|
||||
|
||||
# Host specific settings.
|
||||
case $(hostname) in
|
||||
schnibble | gaffer | localhost)
|
||||
|
Loading…
x
Reference in New Issue
Block a user