6304a789ab280e4a6e984faedd4b046f703327e8

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Only set default LS_COLORS if not set before

Also, force the use of Bourne-style shell syntax with `dircolors -b`.

Diff

 1diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh
 2index 43e245e1649b6fa8fcbc2b66abeff5223bcfc372..621cd067bda1461c539a1d3fc4bb565110a28c9a 100644
 3--- a/lib/theme-and-appearance.zsh
 4+++ b/lib/theme-and-appearance.zsh
 5@@ -19,7 +19,9 @@ then
 6     colorls -G -d . &>/dev/null 2>&1 && alias ls='colorls -G'
 7   else
 8     # For GNU ls, we use the default ls color theme. They can later be overwritten by themes.
 9-    (( $+commands[dircolors] )) && eval "$(dircolors)"
10+    if [[ -z "$LS_COLORS" ]]; then
11+      (( $+commands[dircolors] )) && eval "$(dircolors -b)"
12+    fi
13 
14     ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G'
15   fi