diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-08-13 13:57:54 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-08-13 13:57:54 +0000 |
commit | 2d8280a3a771a991b95fbf771a4cd37525227c13 (patch) | |
tree | 5eb6b5d6e12923dec383e062bc8e3891d13d290c /Completion/User/_colors | |
parent | bcfde8db0082ae65cbc2ca9e7b34161984c8fd80 (diff) | |
download | zsh-2d8280a3a771a991b95fbf771a4cd37525227c13.tar.gz zsh-2d8280a3a771a991b95fbf771a4cd37525227c13.tar.xz zsh-2d8280a3a771a991b95fbf771a4cd37525227c13.zip |
sync up with zsh-workers_7430. #CVSPS.NO.BRANCH
Diffstat (limited to 'Completion/User/_colors')
-rw-r--r-- | Completion/User/_colors | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Completion/User/_colors b/Completion/User/_colors index 797a7d7b3..7a7b0824b 100644 --- a/Completion/User/_colors +++ b/Completion/User/_colors @@ -5,16 +5,10 @@ if (( ! $+_color_cache )); then # Cache of color names doesn't exist yet, create it. - for f in /usr/{,local/,X11R6/,openwin/}lib/X11/rgb.txt - do - if [[ -f $f ]]; then - file=$f - break; - fi - done + file=( /usr/{lib,{{X11R6,openwin},local{,/X11{,R6}}}/lib}/X11/rgb.txt ) - if [[ -n "$file" ]]; then - _color_cache=( "${(@)${(@f)$(< $file)}[2,-1]##* }" ) + if (( $#file )); then + _color_cache=( "${(@)${(@f)$(< $file[1])}[2,-1]##* }" ) else # Stupid default value. @@ -23,4 +17,4 @@ if (( ! $+_color_cache )); then fi fi -compadd - "$_color_cache[@]" +compadd -M 'm:{a-z}={A-Z} m:-=\ r:|[ A-Z0-9]=* r:|=*' - "$_color_cache[@]" |