]> arthur.barton.de Git - ax-zsh.git/commitdiff
ls: Fix detection of color support
authorAlexander Barton <alex@barton.de>
Fri, 28 Aug 2015 15:14:34 +0000 (17:14 +0200)
committerAlexander Barton <alex@barton.de>
Fri, 28 Aug 2015 15:14:34 +0000 (17:14 +0200)
default_plugins/ls/ls.zshrc

index bb7e8698ec797d311a7750c96cc23171ecd28079..b2f07e12f4f9a483f090e23d8a385b378954ac2c 100644 (file)
@@ -12,11 +12,8 @@ fi
 
 if $cmd --color -d . >/dev/null 2>&1; then
        alias ls="$cmd -F --color=tty"
-       return 0
-fi
-if $cmd -G -d . >/dev/null 2>&1; then
+elif $cmd -G -d . >/dev/null 2>&1; then
        alias ls="$cmd -FG"
-       return 0
 fi
 
 # Use LS_COLORS for completion too, when available