about summary refs log tree commit diff
path: root/Completion/User/_colors
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-13 00:41:33 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-13 00:41:33 +0000
commit68cc8e37e3400872ff348a4dcbddda5176fe26de (patch)
tree1d1df4bd1e2c356a3cbd6967bb15e214be782b89 /Completion/User/_colors
parent892ab52d94faed614452a5d84e1d66265a03d86b (diff)
downloadzsh-68cc8e37e3400872ff348a4dcbddda5176fe26de.tar.gz
zsh-68cc8e37e3400872ff348a4dcbddda5176fe26de.tar.xz
zsh-68cc8e37e3400872ff348a4dcbddda5176fe26de.zip
manual/7428
Diffstat (limited to 'Completion/User/_colors')
-rw-r--r--Completion/User/_colors12
1 files changed, 7 insertions, 5 deletions
diff --git a/Completion/User/_colors b/Completion/User/_colors
index 4e9ee2030..797a7d7b3 100644
--- a/Completion/User/_colors
+++ b/Completion/User/_colors
@@ -5,11 +5,13 @@ if (( ! $+_color_cache )); then
 
   # Cache of color names doesn't exist yet, create it.
 
-  if [[ -f /usr/lib/X11/rgb.txt ]]; then
-    file=/usr/lib/X11/rgb.txt
-  elif [[ -f /usr/local/lib/X11/rgb.txt ]]; then
-    file=/usr/local/lib/X11/rgb.txt
-  fi
+  for f in /usr/{,local/,X11R6/,openwin/}lib/X11/rgb.txt
+  do
+    if [[ -f $f ]]; then
+      file=$f
+      break;
+    fi
+  done
 
   if [[ -n "$file" ]]; then
     _color_cache=( "${(@)${(@f)$(< $file)}[2,-1]##*		}" )