Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: _ps, _pdf and _pspdf.



In article <199908111345.PAA07735@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
  Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:

> diff -u -r oc/User/_colors Completion/User/_colors

> diff -u -r oc/User/_pbm Completion/User/_pbm

I found small problems in _pbm and _colors.

Index: Completion/User/_pbm
===================================================================
RCS file: /projects/zsh/zsh/Completion/User/Attic/_pbm,v
retrieving revision 1.2.2.1
diff -u -F^( -r1.2.2.1 _pbm
--- _pbm	1999/08/12 23:19:04	1.2.2.1
+++ _pbm	1999/08/13 00:32:21
@@ -116,7 +116,7 @@
     # 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
Index: Completion/User/_colors
===================================================================
RCS file: /projects/zsh/zsh/Completion/User/Attic/_colors,v
retrieving revision 1.2.2.1
diff -u -F^( -r1.2.2.1 _colors
--- _colors	1999/08/12 23:19:03	1.2.2.1
+++ _colors	1999/08/13 00:32:21
@@ -5,11 +5,13 @@
 
   # 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]##*		}" )

-- 
Tanaka Akira



Messages sorted by: Reverse Date, Date, Thread, Author