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

Re: PATCH: completion



In article <199908241043.MAA09262@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
  Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:

> Hey, that's good, I didn't think about adding such files -- we could
> use that to replace `_x_options', too (with `_x_arguments', which
> could probably still be a pattern function).

Hm. I prefer _xt_arguments instead of _x_arguments because it depends
Xt and there is another popular library --- GTK --- that replace it.

> Now that I've added `Pbmplus', I'd vote for `Completion/X' (and later
> `Completion/Gnu', etc.). We'll have to move some things around when we 
> come to the next open release anyway...

OK.  I use Completion/X.  However existing files such as _xterm are
not moved now. They should be moved in next interim release.

Index: Completion/User/_xterm
===================================================================
RCS file: /projects/zsh/zsh/Completion/User/_xterm,v
retrieving revision 1.1.1.2
diff -u -F^( -r1.1.1.2 _xterm
--- _xterm	1999/08/24 09:18:05	1.1.1.2
+++ _xterm	1999/08/25 01:38:46
@@ -1,6 +1,6 @@
 #compdef xterm
 
-_arguments \
+_xt_arguments \
   '-version' \
   '-help' \
   '-132' \
@@ -16,13 +16,13 @@
   '-cc:character class:' \
   '-cm' '+cm' \
   '-cn' '+cn' \
-  '-cr:text cursor color:_color' \
+  '-cr:text cursor color:_colors' \
   '-cu' '+cu' \
   '-dc' '+dc' \
   '-e:program: _command_names -e:*::program arguments: _normal' \
   '-fb:bold font:' \
   '-fi:icon font:' \
-  '-hc:background color for highlighted text:_color' \
+  '-hc:background color for highlighted text:_colors' \
   '-hf' '+hf' \
   '-ie' '+ie' \
   '-im' '+im' \
@@ -31,7 +31,7 @@
   '-ls' '+ls' \
   '-mb' '+mb' \
   '-mc:multi-click threshold (milliseconds):' \
-  '-ms:pointer cursor color:_color' \
+  '-ms:pointer cursor color:_colors' \
   '-nb:margin bell number:' \
   '-nul' '+nul' \
   '-pc' '+pc' \
@@ -58,15 +58,3 @@
   '-ziconbeep:iconbeep (percent):' \
   '-C' \
   '-S-:pseudo-terminal and file descriptor:' \
-  '-bd:border color:_color' \
-  '-bg:background color:_color' \
-  '-bw:border width:' \
-  '-display:display:_x_display' \
-  '-fg:foreground color:_color' \
-  '-fn:font:' \
-  '-geometry:geometry:' \
-  '-iconic' \
-  '-name:name:' \
-  '-rv' \
-  '-title:title:' \
-  '-xrm:resource:'
diff -Naur Completion/X/_x_borderwidth Completion/X/_x_borderwidth
--- Completion/X/_x_borderwidth	Thu Jan  1 09:00:00 1970
+++ Completion/X/_x_borderwidth	Wed Aug 25 10:27:26 1999
@@ -0,0 +1,3 @@
+#autoload
+
+_message 'border width'
diff -Naur Completion/X/_x_font Completion/X/_x_font
--- Completion/X/_x_font	Thu Jan  1 09:00:00 1970
+++ Completion/X/_x_font	Wed Aug 25 10:27:21 1999
@@ -0,0 +1,3 @@
+#autoload
+
+_message 'font'
diff -Naur Completion/X/_x_geometry Completion/X/_x_geometry
--- Completion/X/_x_geometry	Thu Jan  1 09:00:00 1970
+++ Completion/X/_x_geometry	Wed Aug 25 10:27:42 1999
@@ -0,0 +1,3 @@
+#autoload
+
+_message 'geometry'
diff -Naur Completion/X/_x_locale Completion/X/_x_locale
--- Completion/X/_x_locale	Thu Jan  1 09:00:00 1970
+++ Completion/X/_x_locale	Wed Aug 25 10:29:00 1999
@@ -0,0 +1,3 @@
+#autoload
+
+_message 'locale'
diff -Naur Completion/X/_x_name Completion/X/_x_name
--- Completion/X/_x_name	Thu Jan  1 09:00:00 1970
+++ Completion/X/_x_name	Wed Aug 25 10:28:05 1999
@@ -0,0 +1,3 @@
+#autoload
+
+_message 'name'
diff -Naur Completion/X/_x_resource Completion/X/_x_resource
--- Completion/X/_x_resource	Thu Jan  1 09:00:00 1970
+++ Completion/X/_x_resource	Wed Aug 25 10:29:14 1999
@@ -0,0 +1,3 @@
+#autoload
+
+_message 'resource'
diff -Naur Completion/X/_x_selection_timeout Completion/X/_x_selection_timeout
--- Completion/X/_x_selection_timeout	Thu Jan  1 09:00:00 1970
+++ Completion/X/_x_selection_timeout	Wed Aug 25 10:28:22 1999
@@ -0,0 +1,3 @@
+#autoload
+
+_message 'selection timeout'
diff -Naur Completion/X/_x_title Completion/X/_x_title
--- Completion/X/_x_title	Thu Jan  1 09:00:00 1970
+++ Completion/X/_x_title	Wed Aug 25 10:28:40 1999
@@ -0,0 +1,3 @@
+#autoload
+
+_message 'title'
diff -Naur Completion/X/_xt_arguments Completion/X/_xt_arguments
--- Completion/X/_xt_arguments	Thu Jan  1 09:00:00 1970
+++ Completion/X/_xt_arguments	Wed Aug 25 10:35:00 1999
@@ -0,0 +1,45 @@
+#autoload
+
+# How to convert XrmOptionDescRec:
+
+# XrmOptionDescRec optionDescList[] = {
+#   ...
+#   {option, specifier, argKind, value},
+#   ...
+# };
+
+#  argKind		argument for _xt_arguments
+#  XrmoptionNoArg	option
+#  XrmoptionIsArg	option
+#  XrmoptionStickyArg	option-:message:action
+#  XrmoptionSepArg	option:message:action
+#  XrmoptionResArg	option:message:_x_resource
+#  XrmoptionSkipArg	option:message:action
+#  XrmoptionSkipLine	option:*::message:action
+#  XrmoptionSkipNArgs	option:message[1]:action[1]:...:message[value]:action[value]
+
+# cf. XrmParseCommand(3X11), X11R6.4/xc/lib/Xt/Initialize.c, X(5)
+
+_arguments \
+  '+rv' '-rv' '-reverse' \
+  '+synchronous' '-synchronous' \
+  '-background:background color:_colors' \
+  '-background:background color:_colors' \
+  '-bd:border color:_colors' \
+  '-bg:background color:_colors' \
+  '-bordercolor:border color:_colors' \
+  '-borderwidth:border width:_x_borderwidth' \
+  '-bw:border width:_x_borderwidth' \
+  '-display:display:_x_display' \
+  '-fg:foreground color:_colors' \
+  '-fn:font:_x_font' \
+  '-foreground:foreground color:_colors' \
+  '-geometry:geometry:_x_geometry' \
+  '-iconic' \
+  '-name:name:_x_name' \
+  '-selectionTimeout:selection timeout (milliseconds):_x_selection_timeout' \
+  '-title:title:_x_title' \
+  '-xnllanguage:locale:_x_locale' \
+  '-xrm:resource:_x_resource' \
+  '-xtsessionID:session ID:_xt_session_id' \
+  "$@"
diff -Naur Completion/X/_xt_session_id Completion/X/_xt_session_id
--- Completion/X/_xt_session_id	Thu Jan  1 09:00:00 1970
+++ Completion/X/_xt_session_id	Wed Aug 25 10:29:28 1999
@@ -0,0 +1,3 @@
+#autoload
+
+_message 'session ID'
-- 
Tanaka Akira



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