diff options
Diffstat (limited to 'Completion/X/Command')
-rw-r--r-- | Completion/X/Command/_rdesktop | 71 | ||||
-rw-r--r-- | Completion/X/Command/_urxvt | 4 | ||||
-rw-r--r-- | Completion/X/Command/_x_utils | 31 | ||||
-rw-r--r-- | Completion/X/Command/_xautolock | 25 |
4 files changed, 115 insertions, 16 deletions
diff --git a/Completion/X/Command/_rdesktop b/Completion/X/Command/_rdesktop new file mode 100644 index 000000000..0bd08d932 --- /dev/null +++ b/Completion/X/Command/_rdesktop @@ -0,0 +1,71 @@ +#compdef rdesktop + +local curcontext="$curcontext" state line expl redir ret=1 +typeset -A opt_args + +_arguments -C -s \ + '-u[username]:username:_users' \ + '-d[domain]:domain' \ + '-s[shell]:startup shell' \ + '-c[working directory]:directory:_directories' \ + '-p[password]:password' \ + '-n[hostname]:host:_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)' \ + '-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 + hostsport) + if compset -P '*:'; then + _ports && ret=0 + else + compset -S ':*' + _hosts && ret=0 + fi + ;; + redirection) + redir="${PREFIX%%:*}" + if compset -P '*='; then + curcontext="${curcontext%:*}:$redir" + compset -P '*=' + case $redir in + comport|lptport) _wanted devices expl device _files -g '*(-%)' && ret=0 ;; + disk) _directories && ret=0 ;; + printer) _printers && ret=0 ;; + scard) _message -e aliases 'alias name' ;; + esac + else + compset -S '=*' + _values -S : 'redirection' \ + 'comport:port' \ + 'disk:sharename' \ + 'lptport:lptport' \ + 'printer:printername:_printers -S=' \ + 'sound:sound:(local off remote)' \ + 'lspci' \ + 'scard:sound card name' && ret=0 + fi + ;; +esac + +return ret 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 diff --git a/Completion/X/Command/_xautolock b/Completion/X/Command/_xautolock new file mode 100644 index 000000000..4d01a1dd2 --- /dev/null +++ b/Completion/X/Command/_xautolock @@ -0,0 +1,25 @@ +#compdef xautolock +_arguments \ + '(-enable -toggle)-disable' \ + '(-disable -toggle)-enable' \ + '(-locknow)-unlocknow' \ + '(-unlocknow)-locknow' \ + '(-restart)-exit' \ + '(-exit)-restart' \ + '-killer:program: _command_names -e' \ + '-locker:program: _command_names -e' \ + '-notifier:program: _command_names -e' \ + '-nowlocker:program: _command_names -e' \ + -bell:percent: \ + -cornerdelay:seconds: \ + -cornerredelay:seconds: \ + -corners:corners: \ + -cornersize:pixels: \ + -killtime:minutes: \ + -noclose{,out,err} \ + -notify:seconds: \ + -time:minutes: \ + -secure \ + -resetsaver \ + -detectsleep \ + -{help,version} |