Browse Source

Take advantage of LS_COLORS for the color of completion if GNU ls is used. (#5510)

Hong 7 years ago
parent
commit
98cd3973d2
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/theme-and-appearance.zsh

+ 3 - 0
lib/theme-and-appearance.zsh

@@ -24,6 +24,9 @@ if [[ "$DISABLE_LS_COLORS" != "true" ]]; then
     fi
 
     ls --color -d . &>/dev/null && alias ls='ls --color=tty' || alias ls='ls -G'
+
+    # Take advantage of $LS_COLORS for completion as well.
+    zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
   fi
 fi