diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2016-12-04 04:32:03 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2016-12-04 04:32:03 +0100 |
commit | 3e439c3863f14c82f70666804c8570a13b3732e6 (patch) | |
tree | 07036c43e0f3f9242bb6dd42cd2a849ec8ea8aca /Completion/X/Command/_x_utils | |
parent | 2aedc4b88fd0e87b89583983951b04b96f48efd3 (diff) | |
parent | 7b7e84f0815ed22a0ee348a217776529035dccf3 (diff) | |
download | zsh-3e439c3863f14c82f70666804c8570a13b3732e6.tar.gz zsh-3e439c3863f14c82f70666804c8570a13b3732e6.zip |
Merge tag 'zsh-5.2-test-1' into debian
Diffstat (limited to 'Completion/X/Command/_x_utils')
-rw-r--r-- | Completion/X/Command/_x_utils | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/Completion/X/Command/_x_utils b/Completion/X/Command/_x_utils index 05a899b68..13c5572af 100644 --- a/Completion/X/Command/_x_utils +++ b/Completion/X/Command/_x_utils @@ -1,6 +1,6 @@ -#compdef xdpyinfo xwininfo xkill xfontsel xfd xev xhost xon xsetroot xwd xwud xrdb xprop xlsatoms +#compdef xdpyinfo xwininfo xkill xfontsel xfd xev xhost xon xsetroot xwd xwud xrdb xprop xlsatoms xlsclients -local curcontext="$curcontext" state line expl ret=1 +local curcontext="$curcontext" state state_descr line expl ret=1 case "$service" in xdpyinfo) @@ -26,10 +26,10 @@ xprop) '-font[display the properties of a font]:font: _x_font' \ '-len[show at most n bytes of any property]:n' \ '*-fs[read more property formats from file]:file: _files' \ - '*-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' + '*-remove[specify an atom to remove from the target window]:property atom:->atoms' \ + '*-set[specify an atom and a value to set on the target window]:property atom:->atoms:value' \ + '*-f:property atom:->atoms:format: ::dformat' \ + '*:property atoms:->atoms' ;; xlsatoms) _x_arguments -C \ @@ -37,6 +37,12 @@ xlsatoms) '*-range[atom values to list]:[num]-[num]' \ '*-name[name of single atom to print]:atom:->atoms' ;; +xlsclients) + _x_arguments -C \ + '-a[list all clients on all screens]' \ + '-l[long format adding window/icon names and class hints]' \ + '-m[maximum characters of command to include]:characters' + ;; xkill) _x_arguments \ -version \ @@ -76,12 +82,16 @@ xev) xhost) local type tmp match + if [[ -z $PREFIX ]]; then + _describe prefixes '(-:disallow +:allow)' -S '' -r '' + fi + if compset -P '-'; then tmp=(${(f)"$(xhost)"}) shift tmp tmp=(${tmp:#LOCAL:|<*>}) if [[ "$tmp" = *:* ]]; then - if compset -P '(#b)(*):'; then + if compset -P 1 '(#b)(*):'; then type="$match[1]" _tags displays while _tags; do @@ -112,7 +122,7 @@ xhost) if [[ "$PREFIX" = *:* ]]; then type="${(L)PREFIX%%:*}" - compset -P '*:' + compset -P 1 '*:' case "$type" in inet) _hosts && ret=0;; @@ -193,7 +203,7 @@ xrdb) esac && ret=0 if [[ $state == atoms ]]; then - _wanted atoms expl atoms compadd ${${(f)"$(_call_program atoms xlsatoms 2> /dev/null)"}#*$'\t'} && ret=0 + _wanted atoms expl "$state_descr" compadd ${${(f)"$(_call_program atoms xlsatoms 2> /dev/null)"}#*$'\t'} && ret=0 fi return ret |