about summary refs log tree commit diff
path: root/Completion/X
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/X')
-rw-r--r--Completion/X/_xset65
-rw-r--r--Completion/X/_xwit59
2 files changed, 72 insertions, 52 deletions
diff --git a/Completion/X/_xset b/Completion/X/_xset
index 6cf4da8e1..9f94713bb 100644
--- a/Completion/X/_xset
+++ b/Completion/X/_xset
@@ -32,11 +32,11 @@ _xset_compopts () {
 }
 
 _xset_compfpadd () {
-  _wanted directories expl directory _files -/
+  _files "$expl[@]" -/
 }
 
 _xset_compfpdel () {
-  _wanted directories expl directory compadd - ${(s:,:)${"$(xset q)"##*
+  compadd "$expl[@]" - ${(s:,:)${"$(xset q)"##*
 Font Path:
  #}%%
 *}
@@ -44,69 +44,70 @@ Font Path:
 
 _regex_arguments _xset_parse \
   "/$word/" \
-  \( "/-d(isplay|)$nul/" "$guard" "/$word/" ":_x_display" \
+  \( "/-d(isplay|)$nul/" "$guard" "/$word/" ':option-display:display:_x_display "$expl[@]"' \
   \| "/-c$nul/" "$guard" \
   \| "/c$nul/" "$guard" \
-    \( "/(on|off)$nul/" ':_wanted values expl click compadd on off' \
-    \| "/[0-9]##$nul/" ':_message volume' \
+    \( "/(on|off)$nul/" ':option-c-bool:click:compadd "$expl[@]" on off' \
+    \| "/[0-9]##$nul/" ':option-c-volume:volume:_message volume' \
     \| \) \
   \| "/-b$nul/" "$guard" \
   \| "/b$nul/" "$guard" \
-    \( "/(on|off)$nul/" ':_wanted values expl bell compadd on off' \
-    \| "/[0-9]##$nul/" ':_message volume' \
-      \( "/[0-9]##$nul/" ':_message pitch' \
-	\( "/[0-9]##$nul/" ':_message duration' \
+    \( "/(on|off)$nul/" ':option-b-bool:bell:compadd "$expl[@]" on off' \
+    \| "/[0-9]##$nul/" ':option-b-volume:bell volume:_message volume' \
+      \( "/[0-9]##$nul/" ':option-b-pitch:bell pitch:_message pitch' \
+	\( "/[0-9]##$nul/" ':option-b-duration:bell duration:_message duration' \
 	\| \) \
       \| \) \
     \| \) \
   \| "/bc$nul/" "$guard" \
   \| "/-bc$nul/" "$guard" \
-  \| "/fp$nul/" "$guard" "/$word/" ':_wanted values expl "font path" compadd default rehash' \
-  \| "/(fp[+=]|[+]fp)$nul/" "$guard" "/$word/" ':compset -P "*,"; _xset_compfpadd' \
-  \| "/(fp-|-fp)$nul/" "$guard" "/$word/" ':compset -P "*,"; _xset_compfpdel' \
+  \| "/fp$nul/" "$guard" "/$word/" ':option-fp:font path:compadd "$expl[@]" default rehash' \
+  \| "/(fp[+=]|[+]fp)$nul/" "$guard" "/$word/" ':option-fp-add:font path:compset -P "*,"; _xset_compfpadd' \
+  \| "/(fp-|-fp)$nul/" "$guard" "/$word/" ':option-fp-del:font path:compset -P "*,"; _xset_compfpdel' \
   \| "/-led$nul/" "$guard" \
-    \( "/[0-9]##$nul/" ':_message integer' \
+    \( "/[0-9]##$nul/" ':option-led-number:led number:_message "led number"' \
     \| \) \
   \| "/led$nul/" "$guard" \
-    \( "/(on|off)$nul/" ':_wanted values expl led compadd on off' \
-    \| "/[0-9]##$nul/" ':_message integer' \
+    \( "/(on|off)$nul/" ':option-led-bool:led:compadd "$expl[@]" on off' \
+    \| "/[0-9]##$nul/" ':option-led-number:led number:_message "led number"' \
     \| \) \
   \| "/m(ouse|)$nul/" "$guard" \
-    \( "/default$nul/" ':_wanted values expl "mouse parameter" compadd default' \
-    \| "/[0-9]##(/[0-9]##|)$nul/" ':_message accel_mult/accel_div' \
-      \( "/[0-9]##$nul/" ':_message threshold' \
+    \( "/default$nul/" ':option-mouse-default:mouse parameter:compadd "$expl[@]" default' \
+    \| "/[0-9]##(/[0-9]##|)$nul/" ':option-mouse-mult-div:accel_mult/accel_div:_message accel_mult/accel_div' \
+      \( "/[0-9]##$nul/" ':option-mouse-threshold:threshold:_message threshold' \
       \| \) \
     \| \) \
   \| "/[-+]dpms$nul/" "$guard" \
   \| "/dpms$nul/" "$guard" \
-    \( "/[0-9]##$nul/" ':_message "standby timeout"' \
-      \( "/[0-9]##$nul/" ':_message "suspend timeout"' \
-	\( "/[0-9]##$nul/" ':_message "off timeout"' \
+    \( "/[0-9]##$nul/" ':option-dpms-standby:standby timeout:_message "standby timeout"' \
+      \( "/[0-9]##$nul/" ':option-dpms-suspend:suspend timeout:_message "suspend timeout"' \
+	\( "/[0-9]##$nul/" ':option-dpms-off:off timeout:_message "off timeout"' \
 	\| \) \
       \| \) \
-    \| "/(on|standby|suspend|off)$nul/" ':_wanted values expl DPMS compadd on standby suspend off' \
+    \| "/force/" ':option-dpms-force:force DPMS state:compadd "$expl[@]" force' \
+       "/(on|standby|suspend|off)$nul/" ':option-dpms-state:DPMS state:compadd "$expl[@]" on standby suspend off' \
     \) \
   \| "/s$nul/" "$guard" \
     \( "/(blank|noblank|expose|noexpose|default|on|activate|reset)$nul/" \
-       ':_wanted values expl "screen saver" compadd blank noblank expose noexpose default on activate reset off' \
-    \| "/off$nul/" \( "/off$nul/" ':compadd off' \| \) \
-    \| "/[0-9]##$nul/" ':_message length' \
-      \( "/[0-9]##$nul/" ':_message period' \
+       ':option-s:screen saver:compadd "$expl[@]" blank noblank expose noexpose default on activate reset off' \
+    \| "/off$nul/" \( "/off$nul/" ':option-s-off-period:period off:compadd "$expl[@]" off' \| \) \
+    \| "/[0-9]##$nul/" ':option-s-timeout:length:_message length' \
+      \( "/[0-9]##$nul/" ':option-s-period:period:_message period' \
       \| \) \
     \| \) \
   \| "/-r$nul/" "$guard" \
-    \( "/[0-9]##$nul/" ':_message keycode' \
+    \( "/[0-9]##$nul/" ':option-r-keycode:keycode:_message keycode' \
     \| \) \
   \| "/r$nul/" "$guard" \
-    \( "/(on|off)$nul/" ':_wanted values expl autorepeat compadd on off' \
-    \| "/[0-9]##$nul/" ':_message keycode' \
+    \( "/(on|off)$nul/" ':option-r-autorepeat:autorepeat:compadd "$expl[@]" on off' \
+    \| "/[0-9]##$nul/" ':option-r-keycode:keycode:_message keycode' \
     \| \) \
   \| "/p$nul/" "$guard" \
-    "/[0-9]##$nul/" ':_message pixel' \
-    "/$word/" ':_x_color' \
+    "/[0-9]##$nul/" ':option-p-pixel:pixel:_message pixel' \
+    "/$word/" ':option-p-color:color:_x_color "$expl[@]"' \
   \| "/(-|)k$nul/" "$guard" \
   \| "/(-|)q$nul/" "$guard" \
-  \| "/[]/" ':_xset_compopts' \
+  \| "/[]/" ':options:options:_xset_compopts' \
   \) \#
 
 _xset () {
diff --git a/Completion/X/_xwit b/Completion/X/_xwit
index 69b210e5b..7ec216e76 100644
--- a/Completion/X/_xwit
+++ b/Completion/X/_xwit
@@ -15,34 +15,53 @@ _xwit_guard () {
 }
 
 _xwit_compopts () {
-  local expl
-  _wanted options expl option compadd - ${(k)no[(R)*~0]} ||
-      _wanted options expl option compadd - ${(k)no}
+  compadd "$expl[@]" - ${(k)no[(R)*~0]} ||
+    compadd "$expl[@]" - ${(k)no}
 }
 
 _regex_arguments _xwit_parse \
   "/$word/" \
   \( \
     "/-/+" \
-    \( "/display$nul/" "$guard" "/$word/" ":_x_display" \
+    \( "/display$nul/" "$guard" "/$word/" ':option-display:display:_x_display' \
     \| "/(sync|pop|open|iconify|unmap|root|current|select|(no|)(save|backingstore|saveunder))$nul/" "$guard" \
-    \| "/resize$nul/" "$guard" "/$word/" ":_message width" "/$word/" ":_message height" \
-    \| "/rows$nul/" "$guard" "/$word/" ":_message rows" \
-    \| "/columns$nul/" "$guard" "/$word/" ":_message columns" \
-    \| "/(r|)move$nul/" "$guard" "/$word/" ":_message x" "/$word/" ":_message y" \
-    \| "/(r|)warp$nul/" "$guard" "/$word/" ":_message x" "/$word/" ":_message y" \
-    \| "/colormap$nul/" "$guard" "/$word/" ":_x_colormapid" \
-    \| "/(name|label)$nul/" "$guard" "/$word/" ":_x_name" \
-    \| "/iconname$nul/" "$guard" "/$word/" ":_x_name" \
-    \| "/bitmap$nul/" "$guard" "/$word/" ":_files -g \\*.xbm" \
-    \| "/mask$nul/" "$guard" "/$word/" ":_files -g \\*.xbm" \
-    \| "/iconmove$nul/" "$guard" "/$word/" ":_message x" "/$word/" ":_message y" \
-    \| "/id$nul/" "$guard" "/$word/" ":_x_window" \
+    \| "/resize$nul/" "$guard" \
+       "/$word/" ':option-resize-width:width:_message width' \
+       "/$word/" ':option-resize-height:height:_message height' \
+    \| "/rows$nul/" "$guard" "/$word/" ':option-rows:rows:_message rows' \
+    \| "/columns$nul/" "$guard" "/$word/" ':option-columns:columns:_message columns' \
+    \| "/move$nul/" "$guard" \
+       "/$word/" ':option-move-x:x:_message x' \
+       "/$word/" ':option-move-y:y:_message y' \
+    \| "/rmove$nul/" "$guard" \
+       "/$word/" ':option-rmove-x:x:_message x' \
+       "/$word/" ':option-rmove-y:y:_message y' \
+    \| "/warp$nul/" "$guard" \
+       "/$word/" ':option-warp-x:x:_message x' \
+       "/$word/" ':option-warp-y:y:_message y' \
+    \| "/rwarp$nul/" "$guard" \
+       "/$word/" ':option-rwarp-x:x:_message x' \
+       "/$word/" ':option-rwarp-y:y:_message y' \
+    \| "/colormap$nul/" "$guard" \
+       "/$word/" ':option-colormap:colormapid:_x_colormapid' \
+    \| "/(name|label)$nul/" "$guard" \
+       "/$word/" ':option-name:name:_x_name "$expl[@]"' \
+    \| "/iconname$nul/" "$guard" \
+       "/$word/" ':option-name:iconname:_x_name "$expl[@]"' \
+    \| "/bitmap$nul/" "$guard" \
+       "/$word/" ':option-bitmap:bitmap file:_files "$expl[@]" -g \*.xbm' \
+    \| "/mask$nul/" "$guard" \
+       "/$word/" ':option-mask:mask file:_files "$expl[@]" -g \*.xbm' \
+    \| "/iconmove$nul/" "$guard" \
+       "/$word/" ':option-iconmove-x:x:_message x' \
+       "/$word/" ':option-iconmove-y:y:_message y' \
+    \| "/id$nul/" "$guard" "/$word/" ':option-id:window id:_x_window' \
     \| "/(no|)keyrepeat$nul/" "$guard" \
-        \( "/[0-9]##$nul/" ":[[ -prefix [0-9]# ]] && _message keycode" \
-	  \( "/-$nul/" "/[0-9]##$nul/" ":[[ -prefix [0-9]# ]] && _message 'last keycode'" \| \) \) \# \
-    \| "/names$nul/" "$guard" "/$word/" ":_x_window -n" \# \
-    \| "/[]/" ':_xwit_compopts' \
+        \( "/[0-9]##$nul/" ':option-keyrepeat-keycode:keycode:[[ -prefix [0-9]# ]] && _message keycode' \
+	  \( "/-$nul/" "/[0-9]##$nul/" ':option-keyrepeat-last-keycode:last keycode:[[ -prefix [0-9]# ]] && _message "last keycode"' \| \) \) \# \
+    \| "/names$nul/" "$guard" \
+       "/$word/" ':option-names:window name:_x_window -n' \# \
+    \| "/[]/" ':options:option:_xwit_compopts' \
     \) \
   \) \#