Switched to fallback system for completion coloring with $LS_COLORS

This commit is contained in:
AtomicCoding 2018-05-22 17:16:06 -07:00
parent 47ebceecc4
commit 65ec414b83
No known key found for this signature in database
GPG Key ID: D9C2E2ED3C4516FA
2 changed files with 8 additions and 3 deletions

View File

@ -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'

View File

@ -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