about summary refs log tree commit diff
path: root/Completion/X
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2014-10-14 23:03:40 +0200
committerOliver Kiddle <opk@zsh.org>2014-10-14 23:04:45 +0200
commit13fc579343b24d298fb8905933b6000d7fcda114 (patch)
treecbc1000696357438714107635f93166bcab76d3a /Completion/X
parent66320ca93a717467a0ed0d34da4c06257953aa50 (diff)
downloadzsh-13fc579343b24d298fb8905933b6000d7fcda114.tar.gz
zsh-13fc579343b24d298fb8905933b6000d7fcda114.tar.xz
zsh-13fc579343b24d298fb8905933b6000d7fcda114.zip
33467: correct return status on functions and numerous other minor fixes
Diffstat (limited to 'Completion/X')
-rw-r--r--Completion/X/Command/_urxvt4
-rw-r--r--Completion/X/Command/_x_utils31
2 files changed, 19 insertions, 16 deletions
diff --git a/Completion/X/Command/_urxvt b/Completion/X/Command/_urxvt
index b7ea06be5..661897c3a 100644
--- a/Completion/X/Command/_urxvt
+++ b/Completion/X/Command/_urxvt
@@ -1,6 +1,6 @@
-#compdef rxvt urxvt urxvtc
+#compdef rxvt urxvt urxvtc urxvt256c urxvt256cc urxvt256c-ml urxvt256c-mlc
 
-local curcontext="$curcontext" state line expl
+local curcontext="$curcontext" state line expl ret=1
 local -a suf long_args
 typeset -A opt_args
 typeset -U extensions
diff --git a/Completion/X/Command/_x_utils b/Completion/X/Command/_x_utils
index 9448fd3df..05a899b68 100644
--- a/Completion/X/Command/_x_utils
+++ b/Completion/X/Command/_x_utils
@@ -1,12 +1,13 @@
 #compdef xdpyinfo xwininfo xkill xfontsel xfd xev xhost xon xsetroot xwd xwud xrdb xprop xlsatoms
 
-local ret=1 oret expl
+local curcontext="$curcontext" state line expl ret=1
 
 case "$service" in
 xdpyinfo)
   _x_arguments \
     -queryExtensions \
-    '-ext:extension: _x_extension -a'
+    '-ext:extension: _x_extension -a' \
+    -version
   ;;
 xwininfo)
   _x_arguments \
@@ -16,7 +17,7 @@ xwininfo)
     '(-name -root)-id:id: _x_window'
   ;;
 xprop)
-  _x_arguments \
+  _x_arguments -C \
     -{help,frame,notype,spy} \
     '-grammar[show grammar for command line options]' \
     '(-id -name)-root[use the root window as the target window]' \
@@ -28,16 +29,17 @@ xprop)
     '*-remove[specify an atom to remove from the target window]:atoms:->atoms' \
     '*-set[specify an atom and a value to set on the target window]:atoms:->atoms:value' \
     '*-f:atoms:->atoms:format: ::dformat' \
-    '*:atoms:->atoms' && ret=0
+    '*:atoms:->atoms'
   ;;
 xlsatoms)
-  _x_arguments \
+  _x_arguments -C \
     '*-format[printf-style format to use]:format' \
     '*-range[atom values to list]:[num]-[num]' \
     '*-name[name of single atom to print]:atom:->atoms'
   ;;
 xkill)
   _x_arguments \
+    -version \
     -frame \
     '(-id)-all' \
     '(-all)-id:window: _x_window' \
@@ -45,14 +47,16 @@ xkill)
   ;;
 xfontsel)
   _xt_arguments \
-    -{print,noscaled} \
+    -{print,scaled} \
     '-pattern:font pattern:_x_font' \
     '-sample:sample text' \
-    '-sample16:16-bit sample text'
+    '-sample16:16-bit sample text' \
+    '-sampleUCS:ISO10646 sample text'
   ;;
 xfd)
   _xt_arguments \
     '-fn:font: _x_font' \
+    '-fa:font: _xft_fonts' \
     -{box,center} \
     '-start:first character number' \
     '-bc:box border color:_x_color' \
@@ -66,7 +70,8 @@ xev)
     '-id:id:_x_window' \
     '-s[use save-under]' \
     '-name:window name' \
-    '-rv'
+    '-rv' \
+    '*-event:event mask:(keyboard mouse expose visibility structure substructure focus property colormap owner_grab_button randr)'
   ;;
 xhost)
   local type tmp match
@@ -120,8 +125,8 @@ xhost)
           'types:name family:compadd -S: - inet dnet nis krb' \
 	  'hosts:: _hosts' && ret=0
     fi
-    return ret
   fi
+  return ret
   ;;
 xon)
   _arguments \
@@ -165,7 +170,7 @@ xwud)
   ;;
 xrdb)
   _x_arguments \
-    -{help,quiet,symbols,retain} \
+    -{help,quiet,symbols,retain,version} \
     '(-all -screen -screens)-global' \
     '(-global -screen -screens)-all' \
     '(-global -all -screens)-screen' \
@@ -185,12 +190,10 @@ xrdb)
     '*-I-:include directory:_files -/' \
     '*:defaults file:_files'
   ;;
-esac
+esac && ret=0
 
-oret=$?
 if [[ $state == atoms ]]; then
   _wanted atoms expl atoms compadd ${${(f)"$(_call_program atoms xlsatoms 2> /dev/null)"}#*$'\t'} && ret=0
-else
-  ret=$oret
 fi
+
 return ret