diff options
author | Matt Singleton <msingleton@aclu.org> | 2018-09-07 15:06:04 -0400 |
---|---|---|
committer | Matt Singleton <msingleton@aclu.org> | 2018-09-07 15:06:04 -0400 |
commit | 2359cb2209f670fa3e62008896d42fa1181fcf57 (patch) | |
tree | 74540eac9875b56258856ecb6b4ab8eb9aca7d1f /zsh | |
parent | 8e6456f7258231de651b875686a48f8b8ed5ae92 (diff) |
assume that the version of ls we want to use is already in the search path (instead of checking explicitly for a gls binary)
Diffstat (limited to 'zsh')
-rw-r--r-- | zsh/appearance.zsh | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/zsh/appearance.zsh b/zsh/appearance.zsh index 808a347..fb55827 100644 --- a/zsh/appearance.zsh +++ b/zsh/appearance.zsh @@ -1,20 +1,12 @@ # # colorize shell programs -# ls (platform dependent) -if which gls > /dev/null; then - # if GNU coreutils are installed under the 'g' prefix - alias ls='gls --color=tty' - eval `gdircolors ~/.dircolors.conf` +if ls --color -d . &>/dev/null 2>&1; then + alias ls='ls --color=tty' + eval `dircolors ~/.dircolors.conf` else - # otherwise, detect which version of ls is on the path - if ls --color -d . &>/dev/null 2>&1; then - alias ls='ls --color=tty' - eval `dircolors ~/.dircolors.conf` - else - alias ls='ls -G' - export LSCOLORS="exgxbxdxcxegedxbxgxcxd" - fi + alias ls='ls -G' + export LSCOLORS="exgxbxdxcxegedxbxgxcxd" fi # grep |