From 2359cb2209f670fa3e62008896d42fa1181fcf57 Mon Sep 17 00:00:00 2001 From: Matt Singleton Date: Fri, 7 Sep 2018 15:06:04 -0400 Subject: assume that the version of ls we want to use is already in the search path (instead of checking explicitly for a gls binary) --- zsh/appearance.zsh | 18 +++++------------- 1 file 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 -- cgit v1.2.3