[completion] Update init.zsh and README.md
and use local string variable instead of "hardcoding" the string inside `${}`.
This commit is contained in:
parent
a9828a8097
commit
e70bee54f3
2 changed files with 5 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
Completion
|
completion
|
||||||
==========
|
==========
|
||||||
|
|
||||||
Enables and configures smart and extensive tab completion.
|
Enables and configures smart and extensive tab completion.
|
||||||
|
|
|
@ -59,11 +59,11 @@ zstyle ':completion:*' verbose yes
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' '+r:|?=**'
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' '+r:|?=**'
|
||||||
|
|
||||||
# directories
|
# directories
|
||||||
if (( ${+LS_COLORS} )); then
|
if (( ! ${+LS_COLORS} )); then
|
||||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
# Locally use same LS_COLORS definition from utility module, in case it was not set
|
||||||
else
|
local 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'
|
||||||
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
|
fi
|
||||||
|
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||||
zstyle ':completion:*:*:cd:*' tag-order local-directories directory-stack path-directories
|
zstyle ':completion:*:*:cd:*' tag-order local-directories directory-stack path-directories
|
||||||
zstyle ':completion:*:*:cd:*:directory-stack' menu yes select
|
zstyle ':completion:*:*:cd:*:directory-stack' menu yes select
|
||||||
zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'expand'
|
zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'expand'
|
||||||
|
|
Loading…
Reference in a new issue