From 057c71549225c9cfcf1265b94913573b7aa8ea1c Mon Sep 17 00:00:00 2001 From: Kernc Date: Fri, 28 Feb 2014 06:56:17 +0100 Subject: [PATCH] Make prefix in completion menu of separate color When using zsh completion menu, the already-typed prefix is made faint (decreased intensity) and striked-through, and the next character is made bold (increased intensity). This makes it easy to quickly see which is the next character that distinguishes available completion options. Reddit thread: http://redd.it/msps0 Solution thanks to: @nicoulaj --- modules/completion/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 3ffad633..340e70e7 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -76,7 +76,7 @@ zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters # Directories -zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} +zstyle -e ':completion:*:default' list-colors 'reply=("${PREFIX:+=(#bi)($PREFIX:t)(?)*==2;9=1}:${(s.:.)LS_COLORS}")' 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' 'users' 'expand'