about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-13 03:52:22 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-13 03:52:22 +0000
commit393b463fc3c3246e9a365d88355b0d386fadadd5 (patch)
tree70b8f95c1d7b1808c55d3c909568552db7c3987e
parent2cef45dd3dfa7e886e2294ba959c01f078c1b2c7 (diff)
downloadzsh-393b463fc3c3246e9a365d88355b0d386fadadd5.tar.gz
zsh-393b463fc3c3246e9a365d88355b0d386fadadd5.tar.xz
zsh-393b463fc3c3246e9a365d88355b0d386fadadd5.zip
zsh-workers:7428
-rw-r--r--Completion/User/_colors12
-rw-r--r--Completion/User/_pbm2
2 files changed, 8 insertions, 6 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]##*		}" )
diff --git a/Completion/User/_pbm b/Completion/User/_pbm
index 5ee328cd9..9bcbef933 100644
--- a/Completion/User/_pbm
+++ b/Completion/User/_pbm
@@ -116,7 +116,7 @@ if (( $#opts )); then
     # colon-separated list of words. We just execute this list of words
     # as a command with its arguments.
 
-    if [[ "$after" = *:* ]]; then
+    if [[ "$opts[$after]" = *:* ]]; then
       after="${${opts[after]#*:}//:/ }"
       [[ -z "$after" ]] || $=after 
     fi