summaryrefslogtreecommitdiff
path: root/Completion/X/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/X/Command')
-rw-r--r--Completion/X/Command/_evince30
-rw-r--r--Completion/X/Command/_okular4
-rw-r--r--Completion/X/Command/_rdesktop79
-rw-r--r--Completion/X/Command/_setxkbmap4
-rw-r--r--Completion/X/Command/_x_utils28
5 files changed, 114 insertions, 31 deletions
diff --git a/Completion/X/Command/_evince b/Completion/X/Command/_evince
new file mode 100644
index 000000000..48d5a9aeb
--- /dev/null
+++ b/Completion/X/Command/_evince
@@ -0,0 +1,30 @@
+#compdef evince
+
+_arguments -s -S \
+ - '(help)' \
+ '--version[display version information]' \
+ {-h,--help}'[display help information]' \
+ '--help-all[display help on all options]' \
+ '--help-sm-client[display help on session management options]' \
+ '--help-gtk[display help on GTK+ options]' \
+ - normal \
+ '--sm-client-disable[disable connection to session manager]' \
+ '--sm-client-state-file=[specify file containing saved configuration]:file:_files' \
+ '--sm-client-id=[specify session management ID]:id' \
+ '--class=[specify program class as used by the window manager]:class' \
+ '--name=[program name as used by the window manager]:name:_x_name' \
+ '--gdk-debug=[specify GDK debugging flags to set]:flag' \
+ '--gdk-no-debug=[specify GDK debugging flags to unset]:flag' \
+ '--gtk-module=[load additional GTK+ modules]:module' \
+ '--g-fatal-warnings[make all warnings fatal]' \
+ '--gtk-debug=[specify GTK+ debugging flags to set]:flag' \
+ '--gtk-no-debug=[specify GTK+ debugging flags to unset]:flag' \
+ '(-p --page-label -i --page-index -n --named-dest)'{-p,--page-label=}'[specify page label of the document to display]' \
+ '(-p --page-label -i --page-index -n --named-dest)'{-i,--page-index=}'[specify page number of the document to display]' \
+ '(-p --page-label -i --page-index -n --named-dest)'{-n,--named-dest=}'[specify named destination to display]' \
+ '(-f --fullscreen -s --presentation -w --preview)'{-f,--fullscreen}'[run evince in fullscreen mode]' \
+ '(-f --fullscreen -s --presentation -w --preview)'{-s,--presentation}'[run evince in presentation mode]' \
+ '(-f --fullscreen -s --presentation -w --preview)'{-w,--preview}'[run evince as a previewer]' \
+ '(-l --find)'{-l,--find=}'[specify word or phrase to find in the document]:word or phrase' \
+ '--display=[specify X display]:display:_x_display' \
+ '*:document file:_files -g "*.(#i)(dvi|djvu|pdf|ps|eps|tif|tiff)(-.)"' \
diff --git a/Completion/X/Command/_okular b/Completion/X/Command/_okular
index bfdb4de4b..f08f81c6e 100644
--- a/Completion/X/Command/_okular
+++ b/Completion/X/Command/_okular
@@ -1,10 +1,10 @@
#compdef okular
local extns
-extns="{pdf,ps,eps,dvi}(.gz|.bz2)(#c,1)|djvu|tiff|chm|cbr|cbz"
+extns="(pdf|ps|eps|dvi)(|.gz|.bz2)|djvu|tif|tiff|chm|cbr|cbz"
_arguments \
'(-p --page)'{-p,--page}'[page of the document to be shown]:page: ' \
'--presentation[start the document in presentation mode]' \
'--unique[unique instance control]' \
- "*:Okular documents:_files -g '*.(#i)($extns)(-.)'"
+ "*:okular document:_files -g '*.(#i)($extns)(-.)'"
diff --git a/Completion/X/Command/_rdesktop b/Completion/X/Command/_rdesktop
index 0bd08d932..55a6ea7b5 100644
--- a/Completion/X/Command/_rdesktop
+++ b/Completion/X/Command/_rdesktop
@@ -1,37 +1,81 @@
-#compdef rdesktop
+#compdef rdesktop xfreerdp
-local curcontext="$curcontext" state line expl redir ret=1
+local curcontext="$curcontext" state line expl args redir ret=1
typeset -A opt_args
-_arguments -C -s \
+case $service in
+ rdesktop)
+ args=(
+ '(-5)-4[use RDP version 4]'
+ '(-4)-5[use RDP version 5]'
+ '-b[force server to use bitmaps for screen updates]'
+ '-B[use X server backing store]'
+ '-E[disable encryption]'
+ "-m[don't send mouse motion events]"
+ '-C[use private colormap]'
+ '-S[single application mode]'
+ '-N[enable numlock synchronisation]'
+ '-P[enable bitmap caching]'
+ '*-r[device redirection]: :->redirection'
+ )
+ ;;
+ xfreerdp)
+ args=(
+ '(-)'{-h,--help}'[display help information]'
+ "-o[don't redirect audio to client]"
+ '-s[set startup-shell]:shell'
+ '-t[connect to specified port]:port:_ports'
+ '--app[RemoteApp connection]'
+ '--ext[load an extension]:extension'
+ '--no-auth[disable authentication]'
+ '--authonly[authentication only, no UI]'
+ '--from-stdin[prompt for username, password, domain and hostname]'
+ '--no-fastpath[disable fast-path]'
+ '--gdi[graphics rendering]:backend:(hw sw)'
+ "--no-motion[don't send mouse motion events]"
+ '--no-osb[disable offscreen bitmaps]'
+ '--no-bmp-cache[disable bitmap cache]'
+ '--plugin[load a virtual channel plugin]:(cliprdr drdynvc rdpsnd rail rdpdbg rdpdr)'
+ '--rfx[enable RemoteFX]'
+ '--rfx-mode[RemoteFX operational flags]:mode:((v\:video i\:image))'
+ '--nsc[enable NSCodec]'
+ '--disable-wallpaper'
+ '--composition[enable desktop composition]'
+ '--disable-full-window-drag'
+ '--disable-menu-animations'
+ '--disable-theming'
+ '--kbd-list[list all keyboard layout ids used by -k]'
+ '--no-rdp[disable Standard RDP encryption]'
+ '--no-tls[disable TLS encryption]'
+ '--no-nla[disable network level authentication]'
+ '--ntlm[force NTLM authentication protocol version]:version:(1 2)'
+ '--certificate-name[specify logon certificate]:certificate'
+ '--ignore-certificate[ignore verification of logon certificate]'
+ '--sec[force protocol security]:security:(rdp tls nla)'
+ '--secure-checksum[use salted checksums with Standard RDP encryption]'
+ '--version[print version information]'
+ )
+ ;;
+esac
+
+_arguments -C -s $args \
'-u[username]:username:_users' \
'-d[domain]:domain' \
'-s[shell]:startup shell' \
'-c[working directory]:directory:_directories' \
'-p[password]:password' \
- '-n[hostname]:host:_hosts' \
+ '-n[set reported client hostname]:client hostname:_hosts' \
'-k[keyboard map]:keyboard map' \
'(-f)-g[geometry]:geometry (WxH)' \
'(-g)-f[fullscreen mode]' \
- '-b[force server to use bitmaps for screen updates]' \
- '-B[use X server backing store]' \
- '-E[disable encryption]' \
- "-m[don't send mouse motion events]" \
- '-C[use private colormap]' \
'-D[hide window decorations]' \
'-K[do not override window manager key bindings]' \
- '-S[single application mode]' \
'-T[set window title]:title' \
- '-N[enable numlock synchronisation]' \
'-X[embed in another window]:window:_x_window' \
- '-a[colour depth]:depth:(8 15 16 24)' \
+ '-a[colour depth]:depth:(8 15 16 24 32)' \
'-z[enable compression]' \
'-x[bandwidth performance behaviour]:experience:((b\:broadband l\:lan m\:modem))' \
- '-P[enable bitmap caching]' \
- '*-r[device redirection]: :->redirection' \
'-0[attach to server console]' \
- '(-5)-4[use RDP version 4]' \
- '(-4)-5[use RDP version 5]' \
':server:->hostsport' && ret=0
case $state in
@@ -45,9 +89,8 @@ case $state in
;;
redirection)
redir="${PREFIX%%:*}"
- if compset -P '*='; then
+ if compset -P 1 '*='; then
curcontext="${curcontext%:*}:$redir"
- compset -P '*='
case $redir in
comport|lptport) _wanted devices expl device _files -g '*(-%)' && ret=0 ;;
disk) _directories && ret=0 ;;
diff --git a/Completion/X/Command/_setxkbmap b/Completion/X/Command/_setxkbmap
index c490a9d8c..d192cc17a 100644
--- a/Completion/X/Command/_setxkbmap
+++ b/Completion/X/Command/_setxkbmap
@@ -1,4 +1,4 @@
-# compdef setxkbmap
+#compdef setxkbmap
# TODO:
# model, option, symbols and types suggestions
@@ -90,7 +90,7 @@ _setxkbmap_variant () {
fi
lines=("${(f)$(< ${file})}")
- variants=(${${${(M)lines:#*xkb_symbols*\"([[:alnum:]])##\"*}##*xkb_symbols([^\"])##\"}%%\"*})
+ variants=(${${${(M)lines:#*xkb_symbols*\"([^\"])##\"*}##*xkb_symbols([^\"])##\"}%%\"*})
_wanted variant expl 'variant' compadd -a variants
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