diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-15 12:01:46 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-15 12:01:46 +0000 |
commit | 35b2633ad941966f5fca07b625a594a5b68c0fdb (patch) | |
tree | b54740d014e594ba5d81931cdcdb3387bcf9dfca /Completion/X/_x_color | |
parent | bb98460a01ce1f6c1e71f7e401f782c81b71486b (diff) | |
download | zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.tar.gz zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.tar.xz zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.zip |
manual/8639
Diffstat (limited to 'Completion/X/_x_color')
-rw-r--r-- | Completion/X/_x_color | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Completion/X/_x_color b/Completion/X/_x_color index 4c1c73bf4..2daeb51d6 100644 --- a/Completion/X/_x_color +++ b/Completion/X/_x_color @@ -15,8 +15,9 @@ if (( ! $+_color_cache )); then # Cache of color names doesn't exist yet, create it. - if [[ -n "$compconfig[colors_path]" ]]; then - _color_cache=( "${(@)${(@f)$(< $compconfig[colors_path])}[2,-1]##* }" ) + _style -s colors path file + if [[ -n "$file" ]]; then + _color_cache=( "${(@)${(@f)$(< $file)}[2,-1]##* }" ) else file=( /usr/{lib,{{X11R6,openwin},local{,/X11{,R6}}}/lib}/X11/rgb.txt(N) ) @@ -29,8 +30,6 @@ if (( ! $+_color_cache )); then (( $#_color_cache )) || _color_cache=(white black gray red blue green) fi -_tags any colors || return 1 - -_description expl 'color specification' -compadd "$@" "$expl[@]" -M 'm:{a-z}={A-Z} m:-=\ r:|[ A-Z0-9]=* r:|=*' - \ - "$_color_cache[@]" +_wanted colors expl 'color specification' && + compadd "$@" "$expl[@]" -M 'm:{a-z}={A-Z} m:-=\ r:|[ A-Z0-9]=* r:|=*' - \ + "$_color_cache[@]" |