From 65ec414b835da78248dcc5a5c799a9064cefa0d7 Mon Sep 17 00:00:00 2001 From: AtomicCoding Date: Tue, 22 May 2018 17:16:06 -0700 Subject: [PATCH] Switched to fallback system for completion coloring with $LS_COLORS --- modules/completion/init.zsh | 8 ++++++++ modules/utility/init.zsh | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 1a75e67..1f9667d 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -59,6 +59,14 @@ zstyle ':completion:*' verbose yes zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' '+r:|?=**' # directories +# If LS_COLORS is set, just use it +if (( ${+LS_COLORS} )); then + # Set completion colors to LS_COLORS + zstyle ':completion:*' list-colors $LS_COLORS +else + # Fallback to default LS_COLORS + zstyle ':completion:*' list-colors 'di=1;34:ln=35:so=32:pi=33:ex=31:bd=1;36:cd=1;33:su=30;41:sg=30;46:tw=30;42:ow=30;43' +fi zstyle ':completion:*:*:cd:*' tag-order local-directories directory-stack path-directories zstyle ':completion:*:*:cd:*:directory-stack' menu yes select zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'expand' diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index b6f5435..55cdde8 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -12,9 +12,6 @@ if (( terminfo[colors] >= 8 )); then # GNU colours are used by completion module for all OSTYPEs (( ! ${+LS_COLORS} )) && export LS_COLORS='di=1;34:ln=35:so=32:pi=33:ex=31:bd=1;36:cd=1;33:su=30;41:sg=30;46:tw=30;42:ow=30;43' - # Set completion colors to LS_COLORS - zstyle ':completion:*' list-colors $LS_COLORS - if (( ${+commands[dircolors]} )); then # GNU