add support for dircolors in macos with brew coreutils
This commit is contained in:
parent
6ad08e7998
commit
a662c35cbc
16
darwin.zsh
16
darwin.zsh
|
@ -5,8 +5,22 @@
|
|||
|
||||
# Darwin ls command does not support --color option.
|
||||
alias ls=' ls'
|
||||
alias myls=' ls'
|
||||
#alias myls=' ls'
|
||||
# use gnu ls instead of bsd ls
|
||||
alias myls=' gls -C -F -h --color=always'
|
||||
|
||||
# The OSX way for ls colors.
|
||||
export CLICOLOR=1
|
||||
export LSCOLORS="gxfxcxdxbxegedabagacad"
|
||||
|
||||
# activate gls colors
|
||||
if [[ -a $HOME/.dir_colors ]]; then
|
||||
if [[ "$TERM" == *256* ]]; then
|
||||
which gdircolors > /dev/null && eval "`gdircolors -b $HOME/.dir_colors`"
|
||||
else
|
||||
# standard colors for non-256-color terms
|
||||
which gdircolors > /dev/null && eval "`gdircolors -b`"
|
||||
fi
|
||||
else
|
||||
which gdircolors > /dev/null && eval "`gdircolors -b`"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue