From 4d979d9e928963929787ac1ba6eb6e67177a4cd2 Mon Sep 17 00:00:00 2001 From: AtomicCoding Date: Mon, 21 May 2018 18:58:51 -0700 Subject: [PATCH 1/6] Added zstyle to set completion colors --- modules/utility/init.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index 55cdde8..b6f5435 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -12,6 +12,9 @@ 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 From 47ebceecc48060bb8c649f8fdb00337b836b7d65 Mon Sep 17 00:00:00 2001 From: Atomic Coding Date: Mon, 21 May 2018 19:11:47 -0700 Subject: [PATCH 2/6] Remove zstyle from `completion` module --- modules/completion/init.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index cfdb129..1a75e67 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -59,7 +59,6 @@ zstyle ':completion:*' verbose yes zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' '+r:|?=**' # directories -zstyle ':completion:*:default' list-colors ${(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' 'expand' From 65ec414b835da78248dcc5a5c799a9064cefa0d7 Mon Sep 17 00:00:00 2001 From: AtomicCoding Date: Tue, 22 May 2018 17:16:06 -0700 Subject: [PATCH 3/6] 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 From b5c1939f680153d54959fb130f336d19b024cb8a Mon Sep 17 00:00:00 2001 From: Atomic Coding Date: Tue, 22 May 2018 17:21:48 -0700 Subject: [PATCH 4/6] Modified to split at : --- modules/completion/init.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 1f9667d..d7fbfb4 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -62,10 +62,10 @@ zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' '+r:|?=**' # If LS_COLORS is set, just use it if (( ${+LS_COLORS} )); then # Set completion colors to LS_COLORS - zstyle ':completion:*' list-colors $LS_COLORS + zstyle ':completion:*' list-colors ${(s.:.)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' + zstyle ':completion:*' list-colors ${(s.:.)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 From e82be877025001da079ef155afce9fa046fe78d1 Mon Sep 17 00:00:00 2001 From: Atomic Coding Date: Tue, 22 May 2018 17:53:30 -0700 Subject: [PATCH 5/6] Update Completion README to reflect changes Completion module can now be loaded from an arbitrary location. --- modules/completion/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/completion/README.md b/modules/completion/README.md index 6fc0fa9..d8cb6cf 100644 --- a/modules/completion/README.md +++ b/modules/completion/README.md @@ -5,8 +5,6 @@ Enables and configures smart and extensive tab completion. Completions are sourced from [zsh-completions](https://github.com/zsh-users/zsh-completions). -This should be the **LAST** module in the `zmodules` list in your `.zimrc`. - Contributing ------------ From 2394611d546ed0ade62ed6a331094e7d56aa935d Mon Sep 17 00:00:00 2001 From: Atomic Coding Date: Thu, 24 May 2018 17:26:06 -0700 Subject: [PATCH 6/6] Styling Changes Removed comments and modified zstyling location to comply with manual --- modules/completion/init.zsh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index d7fbfb4..5e0d05a 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -59,13 +59,10 @@ 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 ${(s.:.)LS_COLORS} + zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} else - # Fallback to default LS_COLORS - zstyle ':completion:*' list-colors ${(s.:.)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} + zstyle ':completion:*:default' list-colors ${(s.:.)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