From 8c9d25d452d91eede64e845cef982593248e0701 Mon Sep 17 00:00:00 2001 From: Simon Gomizelj Date: Mon, 12 Dec 2011 01:41:46 -0500 Subject: [PATCH] If LS_COLORS set, use those colours for tab completion for consistent appearance. Using this is simply a matter of calling dircolors _before_ omz init. --- lib/completion.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index b3cc91822..e0a94a664 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -18,7 +18,11 @@ else zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' fi -zstyle ':completion:*' list-colors '' +if [[ -n $LS_COLORS ]]; then + zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} +else + zstyle ':completion:*' list-colors '' +fi # should this be in keybindings? bindkey -M menuselect '^o' accept-and-infer-next-history