]> arthur.barton.de Git - ax-zsh.git/blobdiff - default_plugins/ls/ls.zshrc
Correctly test XDG_CACHE_HOME for writability for "stamp files"
[ax-zsh.git] / default_plugins / ls / ls.zshrc
index 8ac3ba081b92dec2de7aa4551a126cc63fd69142..b2f07e12f4f9a483f090e23d8a385b378954ac2c 100644 (file)
@@ -12,9 +12,11 @@ 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
+if [[ -n "$LS_COLORS" ]]; then
+       zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
 fi