diff options
Diffstat (limited to 'Completion/X/Command')
-rw-r--r-- | Completion/X/Command/_code | 2 | ||||
-rw-r--r-- | Completion/X/Command/_gnome-gv | 2 | ||||
-rw-r--r-- | Completion/X/Command/_gv | 5 | ||||
-rw-r--r-- | Completion/X/Command/_kdeconnect | 2 | ||||
-rw-r--r-- | Completion/X/Command/_mozilla | 2 | ||||
-rw-r--r-- | Completion/X/Command/_mplayer | 6 | ||||
-rw-r--r-- | Completion/X/Command/_netscape | 2 | ||||
-rw-r--r-- | Completion/X/Command/_pdftk | 14 | ||||
-rw-r--r-- | Completion/X/Command/_sublimetext | 2 | ||||
-rw-r--r-- | Completion/X/Command/_urxvt | 4 | ||||
-rw-r--r-- | Completion/X/Command/_vnc | 6 | ||||
-rw-r--r-- | Completion/X/Command/_xauth | 2 | ||||
-rw-r--r-- | Completion/X/Command/_xdvi | 2 | ||||
-rw-r--r-- | Completion/X/Command/_xinput | 139 | ||||
-rw-r--r-- | Completion/X/Command/_xournal | 2 | ||||
-rw-r--r-- | Completion/X/Command/_xrandr | 11 | ||||
-rw-r--r-- | Completion/X/Command/_xset | 4 | ||||
-rw-r--r-- | Completion/X/Command/_xterm | 2 |
18 files changed, 178 insertions, 31 deletions
diff --git a/Completion/X/Command/_code b/Completion/X/Command/_code index b725b2a17..76cd3dd19 100644 --- a/Completion/X/Command/_code +++ b/Completion/X/Command/_code @@ -4,7 +4,7 @@ local arguments arguments=( '(-d --diff)'{-d,--diff}'[compare two files with each other]:file to compare:_files:file to compare with:_files' - \*{-a,--add}'[add specified directory to the last active window.]:directory:_directories' + \*{-a,--add}'[add specified directory to the last active window]:directory:_directories' '(-g --goto)'{-g,--goto}'[open a file at the path on the specified line and column position]:file\:line[\:column]:_files -r \:' '(-n --new-window -r --reuse-window)'{-n,--new-window}'[open a new window]' '(-n --new-window -r --reuse-window)'{-r,--reuse-window}'[open a file or directory in the last active window]' diff --git a/Completion/X/Command/_gnome-gv b/Completion/X/Command/_gnome-gv index 25de6fadf..b1b66e2a4 100644 --- a/Completion/X/Command/_gnome-gv +++ b/Completion/X/Command/_gnome-gv @@ -1,6 +1,6 @@ #compdef gnome-gv ggv _arguments \ - '(--help)-\\?[help]' \ + '(--help)-?[help]' \ '(--windows)-w[number of empty windows]:number:' \ '*:file: _pspdf -z' -- diff --git a/Completion/X/Command/_gv b/Completion/X/Command/_gv index cde8a1c1a..9b11ad31c 100644 --- a/Completion/X/Command/_gv +++ b/Completion/X/Command/_gv @@ -28,8 +28,11 @@ _arguments \ '(--portrait --seascape --upsidedown)--landscape' \ '(--portrait --landscape --upsidedown)--seascape' \ '(--portrait --landscape --seascape)--upsidedown' \ - --{help,spartan} \ -{h,v} \ + -{,-}{help,version} \ + -{,-}{spartan,widgetless,presentation,fullscreen} \ + -{,-}{infoSilent,infoErrors,infoAll} \ + -{,-}'password=:password:' \ '--arguments=:ghostscript arguments:' \ '--page=:label of first page:' \ '--media=:page size:(Letter Legal Statement Tabloid Ledger Folio Quarto 10x14 Executive A3 A4 A5 B4 B5)' \ diff --git a/Completion/X/Command/_kdeconnect b/Completion/X/Command/_kdeconnect index ffb7f5774..ee186690c 100644 --- a/Completion/X/Command/_kdeconnect +++ b/Completion/X/Command/_kdeconnect @@ -10,7 +10,7 @@ _arguments \ '--id-only[make --list-devices or --list-available print only the devices id, to ease scripting]' \ '--refresh[search for devices in the network and re-establish connections]' \ '(--pair --unpair)--pair[request pairing with the specified device]' \ - '--ring[find the device by ringing it.]' \ + '--ring[find the device by ringing it]' \ '(--pair --unpair)--unpair[stop pairing to the specified device]' \ '(--ping --ping-msg)--ping[send a ping to the device]' \ '(--ping --ping-msg)--ping-msg[send a ping to the device with the specified message]:message' \ diff --git a/Completion/X/Command/_mozilla b/Completion/X/Command/_mozilla index 64f4d9450..0be25b8d3 100644 --- a/Completion/X/Command/_mozilla +++ b/Completion/X/Command/_mozilla @@ -95,7 +95,7 @@ if [[ "$state" = "remote" ]]; then ;; *) compset -S '(|\\)\(*' || suf="${${QIPREFIX:+(}:-\(}" - _wanted commands expl 'remote commands' \ + _wanted commands expl 'remote command' \ compadd -qS "$suf" -M 'm:{a-zA-Z}={A-Za-z}' -a \ remote_commands && ret=0 ;; diff --git a/Completion/X/Command/_mplayer b/Completion/X/Command/_mplayer index a913960fe..1f99a1789 100644 --- a/Completion/X/Command/_mplayer +++ b/Completion/X/Command/_mplayer @@ -131,13 +131,13 @@ case "$state" in ;; audio-drivers) vals=( help ${${${(f)"$(_call_program audio-drivers mplayer -ao help 2>/dev/null)"}[(r) *,-1]#?}/ /:} ) - _describe -t audio-drivers 'audio drivers' vals && ret=0 + _describe -t audio-drivers 'audio driver' vals && ret=0 ;; audio-codec-families) compset -P '*,' compset -S ',*' vals=( help ${${${(f)"$(_call_program audio-codec-families mplayer -afm help 2>/dev/null)"}[(r) [^:]#,-1]## ##}/ ##/:} ) - _describe -t audio-codec-families 'audio drivers' vals && ret=0 + _describe -t audio-codec-families 'audio driver' vals && ret=0 ;; audio-plugins) _values -s : 'audio output plugin' \ @@ -154,7 +154,7 @@ case "$state" in ;; video-drivers) vals=( help ${${${(f)"$(_call_program video-drivers mplayer -vo help 2>/dev/null)"}[(r) *,-1]#?}/ /:} ) - _describe -t video-drivers 'video drivers' vals && ret=0 + _describe -t video-drivers 'video driver' vals && ret=0 ;; video-output-plugins) vals=( help ${${${${(f)"$(_call_program video-output-plugins mplayer -vop help 2>/dev/null)"}[(r) *,-1]}/ /}/ #: /:} ) diff --git a/Completion/X/Command/_netscape b/Completion/X/Command/_netscape index e1d02ae90..78b2da649 100644 --- a/Completion/X/Command/_netscape +++ b/Completion/X/Command/_netscape @@ -52,7 +52,7 @@ if [[ "$state" = "remote" ]]; then ;; *) compset -S '(|\\)\(*' || suf="${${QIPREFIX:+(}:-\(}" - _wanted commands expl 'remote commands' \ + _wanted commands expl 'remote command' \ compadd -qS "$suf" -M 'm:{a-zA-Z}={A-Za-z}' -a \ remote_commands && ret=0 ;; diff --git a/Completion/X/Command/_pdftk b/Completion/X/Command/_pdftk index b8c43f754..b26deb15f 100644 --- a/Completion/X/Command/_pdftk +++ b/Completion/X/Command/_pdftk @@ -24,7 +24,7 @@ case $words[CURRENT-1] in (allow) #_description permissions expl "permission" #compadd $expl \ - _values -s , permissions \ + _values -s , permission \ Printing DegradedPrinting ModifyContents Assembly CopyContents \ ScreenReaders ModifyAnnotations FillIn AllFeatures ;; @@ -34,13 +34,11 @@ case $words[CURRENT-1] in ;; (fill_form) - _description files expl 'FDF and XFDF files' - _files "$@" $expl -g '(#i)*.(fdf|xfdf)' + _wanted files expl 'FDF or XFDF file' _files -g '(#i)*.(fdf|xfdf)(-.)' ;; ((multibackground|background|stamp|multistamp|output)) - _description files expl 'PDF files' - _files "$@" $expl -g '(#i)*.pdf' + _pdf ;; (update_info) @@ -53,11 +51,11 @@ case $words[CURRENT-1] in esac && return 0 if [[ -n $words[(r)(${(j:|:)operations})] ]]; then - _description options expl "options" + _description options expl "option" compadd $@ $expl $opts else _tags files operations _alternative \ - 'files:PDF files:_pdfwithhandle' \ - "operations:operations:($operations)" + 'files:PDF file:_pdfwithhandle' \ + "operations:operation:($operations)" fi diff --git a/Completion/X/Command/_sublimetext b/Completion/X/Command/_sublimetext index 1243d2779..5382e5dbc 100644 --- a/Completion/X/Command/_sublimetext +++ b/Completion/X/Command/_sublimetext @@ -8,6 +8,8 @@ _arguments -s -S : \ '(-a -n --add --new-window)'{-n,--new-window}'[open new window]' \ '--project[load specified project]:project file:_files' \ '(-s --stay)'{-s,--stay}'[keep application activated]' \ + '--safe-mode[launch using sandboxed (clean) environment]' \ + '--launch-or-new-window[only open new window if application is open]' \ '(: -)'{-v,--version}'[display version information]' \ '(-w --wait)'{-w,--wait}'[wait for files to close]' \ '*:file or directory:_files' diff --git a/Completion/X/Command/_urxvt b/Completion/X/Command/_urxvt index 661897c3a..2d7c09579 100644 --- a/Completion/X/Command/_urxvt +++ b/Completion/X/Command/_urxvt @@ -43,8 +43,8 @@ _x_arguments \ '-sl:save lines' \ '-embed:window id to embed terminal in:_x_window' \ '-pty-fd:file descriptor of pty to use' \ - '-w:external border in pixels' \ - '-b:internal border in pixels' \ + {-bw,-w}':external border (pixels)' \ + '-b:internal border (pixels)' \ '-lsp:number of extra pixels between rows' \ '-letsp:letter spacing adjustment' \ '-mod:meta modifier:_x_modifier' \ diff --git a/Completion/X/Command/_vnc b/Completion/X/Command/_vnc index d60616f21..7d818cfe7 100644 --- a/Completion/X/Command/_vnc +++ b/Completion/X/Command/_vnc @@ -65,10 +65,10 @@ case $service in '-rfbauth[use authentication on RFB protocol]:passwd-file:_files' \ '-httpd[serve files via HTTP from here]:dir:_files -/' \ '-httpport[port for HTTP]:port:' \ - '-deferupdate[time in ms to defer updates (default 40)]:time (ms):' \ + '-deferupdate[specify time to defer updates by]:time (ms) [40]' \ '-economictranslate[less memory-hungry translation]' \ '-lazytight[disable "gradient" filter in tight encoding]' \ - '-desktop[VNC desktop name (default x11)]:name:' \ + '-desktop[specify VNC desktop name]:name [x11]' \ '-alwaysshared[always treat new clients as shared]' \ '-nevershared[never treat new clients as shared]' \ "-dontdisconnect[don't disconnect existing clients for new non-shared connections]" \ @@ -86,7 +86,7 @@ case $service in ;; *vncviewer) _xt_arguments -shared -viewonly -fullscreen -bgr233 -owncmap -truecolour \ - '-encodings:encodings:_values -s " " encoding copyrect hextile corre rre raw' \ + '-encodings: :_values -s " " encoding copyrect hextile corre rre raw' \ '-depth:depth' \ '-passwd:file:_files' \ '(1)-listen:display number' \ diff --git a/Completion/X/Command/_xauth b/Completion/X/Command/_xauth index 14dfc8400..22ebffecd 100644 --- a/Completion/X/Command/_xauth +++ b/Completion/X/Command/_xauth @@ -41,7 +41,7 @@ while [[ -n "$state" ]]; do group) _message -e ids 'group-id';; data) _message -e values 'hexdata';; *) - _wanted options expl 'xauth generate options' \ + _wanted options expl 'xauth generate option' \ compadd trusted untrusted timeout group data && ret=0 ;; esac diff --git a/Completion/X/Command/_xdvi b/Completion/X/Command/_xdvi index d55c99485..c33e67bcc 100644 --- a/Completion/X/Command/_xdvi +++ b/Completion/X/Command/_xdvi @@ -9,7 +9,7 @@ _xt_arguments \ '-cr:cursor color:_x_color' \ '-debug:debugging bitmask:((1\:bitmaps 2\:dvi\ translation 4\:pk\ reading 8\:batch\ operation 16\:events 32\:file\ opening 64\:PostScript\ communication 128\:Kpathsea\ statistics 256\:Kpathsea\ hash\ table\ lookups 512\:Kpathsea\ path\ definitions 1024\:Kpathsea\ path\ expansion 2048\:Kpathsea\ searches))' \ '-density:font shrink density' \ - '-gamma:anti-aliasing factor (default 1.0)' \ + '-gamma:anti-aliasing factor [1.0]' \ -grid{1,2,3}':grid color:_x_color' \ '-gspalette:Ghostscript palette:(Color Greyscale Monochrome)' \ '-hl:page highlight color:_x_color' \ diff --git a/Completion/X/Command/_xinput b/Completion/X/Command/_xinput new file mode 100644 index 000000000..2bbadd65a --- /dev/null +++ b/Completion/X/Command/_xinput @@ -0,0 +1,139 @@ +#compdef xinput + +local curcontext="$curcontext" xinput=${words[1]} desc subcmd out ret=1 +local match mbegin mend +local -a state state_descr line args cmds ids names disp expl +local -A opt_args + +cmds=( + 'get-feedbacks:display device feedbacks' + 'set-ptr-feedback:change pointer acceleration (or feedback) parameters ' + 'set-integer-feedback:change value of an integer device feedback' + 'get-button-map:get the button mapping of a device' + 'set-button-map:change the button mapping of a device' + set-pointer + "set-mode:set a device's mode" + 'list:list input devices or device features' + "query-state:query a device's state" + 'test:perpetual display of extended events from a device' + 'create-master:create a new pair of master devices on an XI2-enabled server' + 'remove-master:remove a master and its paired master device' + 'reattach:reattach a slave to a master' + 'float:remove a slave from its current master device' + 'set-cp:set the ClientPointer for the client owning window to master' + 'test-xi2:perpetual display of XI2 events' + 'map-to-output:restrict movements of the absolute device to an RandR crtc' + 'list-props:list properties that can be set for a device' + set-int-prop set-float-prop set-atom-prop + 'watch-props:perpetual display of property changes' + 'delete-prop:delete a property from a device' + 'set-prop:set a property to a given value' + 'disable:disable a device' + 'enable:enable a device' + 'help:display usage information' + 'version:display version information for program and server' +) + +if (( CURRENT == 2 )); then + if [[ -prefix - ]]; then + cmds=( --$^cmds ) + desc=option + else + desc=command + fi + _describe -t ${desc}s $desc cmds -M 'r:|-=* r:|=*' + return +fi + +subcmd=${words[2]#--} +curcontext="${curcontext%:*}-$subcmd:" + +args=( '1:device:->devices' ) +case $subcmd in + (set|delete)-*prop) args+=( '2:property:->properties' ) ;| + set-*prop) args+=( '*:value' ) ;| + set-ptr-feedback) args+=( '2:threshold' '3:num' '4:denom' ) ;; + set-integer-feedback) args+=( '2:feedback id' '3:value' ) ;; + set-button-map) + args+=( '*:::button mapping:compadd -F words -o numeric {1..12}' ) + ;; + set-pointer) args+=( '2:x index' '3:y index' ) ;; + set-mode) args+=( '2:mode:(ABSOLUTE RELATIVE)' ) ;; + list) args+=( '(-)--short' '(-)--long' '(-)--name-only' '(-)--id-only' ) ;; + test) args+=( '-proximity' ) ;; + create-master) + args=( + '1:prefix' + '2:send core events [1]:((0\:false 1\:true))' + '3:enable [1]:((0\:false 1\:true))' + ) + ;; + remove-master) + args=( + '1:master:->devices' + '2:slave setting:(Floating AttachToMaster)' + '3:pointer master:->devices' + '4:keyboard master:->devices' + ) + ;; + reattach) args=( '1:slave:->devices' '2:master:->devices' ) ;; + float) args=( '1:slave:->devices' ) ;; + set-cp) args=( '1:window:_x_window' '2:device:->devices' ) ;; + test-xi2) args+=( '--root[select events on the root window only]' ) ;; + map-to-output) args+=( '2:output:->outputs' ) ;; + list-props) args=( '*:device:->devices' ) ;; + set-int-prop) args+=( '3:format:compadd -o numeric 8 16 32' ) ;; + set-prop) + args+=( + '--type=-:type:(atom float int)' + '--format=-:format:compadd -o numeric 8 16 32' + ) + ;; + help|version) _message 'no more arguments'; return 1 ;; +esac + +shift words +(( CURRENT-- )) +_arguments -C -A "-*" $args && ret=0 + +case $state in + devices) + _description input-devices expl $state_descr + + ids=( ${${(f)"$(_call_program input-devices $xinput list --id-only)"}#? } ) + names=( ${${(f)"$(_call_program input-devices $xinput list --name-only)"}#? } ) + disp=( ${(f)"$(_call_program input-devices $xinput list --short)"} ) + + if [[ $PREFIX$SUFFIX = [^-]*[^0-9]* ]]; then + # match based on the names but insert IDs + compadd "$expl[@]" -M 'b:=* m:{[:lower:]}={[:upper:]}' -D ids -D disp -a names + compadd "$expl[@]" -U -ld disp -a ids && ret=0 + + zstyle -s ":completion:${curcontext}:input-devices" insert-ids out || out=menu + case "$out" in + menu) compstate[insert]=menu ;; + single) [[ $#ids -ne 1 && $compstate[insert] != menu ]] && + compstate[insert]= ;; + *) [[ ${#:-$PREFIX$SUFFIX} -gt ${#compstate[unambiguous]} ]] && + compstate[insert]=menu ;; + esac + else + compadd "$expl[@]" -M 'B:0=' -o nosort -ld disp -a ids && ret=0 + fi + ;; + properties) + _description input-properties expl 'property' + disp=( ${${${${(M)${(f)"$(_call_program input-properties + $xinput list-props $line[1] + )"}:#[[:blank:]]*}##[[:blank:]]#}%%:*}:/(#b)(*) \((<->)\)/$match[2]:$match[1]} + ) + _describe -t input-properties $state_descr disp -o numeric && ret=0 + ;; + outputs) + _description outputs expl 'output' + compadd "$expl[@]" - ${${(M)${(f)"$(_call_program outputs + xrandr)"}:#* connected*}%% *} && ret=0 + ;; +esac + +return ret diff --git a/Completion/X/Command/_xournal b/Completion/X/Command/_xournal index 066ef55f5..c36210c26 100644 --- a/Completion/X/Command/_xournal +++ b/Completion/X/Command/_xournal @@ -2,5 +2,5 @@ local expl -_description files expl 'PDF and Xournal files' +_description files expl 'PDF or Xournal file' _files "$@" "$expl[@]" -g '*.(#i){xoj,pdf}(-.)' diff --git a/Completion/X/Command/_xrandr b/Completion/X/Command/_xrandr index 67045b33d..2551e1958 100644 --- a/Completion/X/Command/_xrandr +++ b/Completion/X/Command/_xrandr @@ -1,6 +1,6 @@ #compdef xrandr -local curcontext="$curcontext" state line expl +local curcontext="$curcontext" state line expl state_descr typeset -A opt_args _arguments -C \ @@ -36,6 +36,7 @@ _arguments -C \ '*--set:property:(Backlight scaling\ mode):value:->value' \ '*--scale:output scaling:' \ '*--transform:transformation matrix:' \ + '*--filter:mode:(nearest bilinear)' \ '*--off[disable the output]' \ '*--crtc:crtc to use:' \ '*--panning:panning:' \ @@ -47,8 +48,8 @@ _arguments -C \ "*--addmode:output:->outputs:name" \ "*--delmode:output:->outputs:name" \ '--listproviders' \ - '--setprovideroutputsource:provider: :source' \ - '--setprovideroffloadsink:provider: :sink' \ + '--setprovideroutputsource:provider:->providers:source:->providers' \ + '--setprovideroffloadsink:provider:->providers:sink:->providers' \ '--listmonitors' \ '--listactivemonitors' \ '--setmonitor:name' \ @@ -75,4 +76,8 @@ case $state in _wanted modes expl mode compadd \ ${(Mun)$(_call_program modes xrandr):#[0-9]##x[0-9]##} && return 0 ;; + providers) + local -a xrandr_providers=(${(f)"$(_call_program providers xrandr --listproviders)"}) + _wanted xrandr-providers expl $state_descr compadd ${${xrandr_providers}[2,-1]##*:} && return 0 + ;; esac diff --git a/Completion/X/Command/_xset b/Completion/X/Command/_xset index b35a6466b..adda47f01 100644 --- a/Completion/X/Command/_xset +++ b/Completion/X/Command/_xset @@ -91,8 +91,8 @@ _regex_arguments _xset_parse \ \( "/(blank|noblank|expose|noexpose|default|on|activate|reset)$nul/" \ ':option-s:screen saver:(blank noblank expose noexpose default on activate reset off)' \ \| "/off$nul/" \( "/off$nul/" ':option-s-off-period:period off:(off)' \| \) \ - \| "/[0-9]##$nul/" ':option-s-timeout:length:' \ - \( "/[0-9]##$nul/" ':option-s-period:period:' \ + \| "/[0-9]##$nul/" ':option-s-timeout: :_numbers -u seconds length' \ + \( "/[0-9]##$nul/" ':option-s-period: :_numbers -u seconds period' \ \| \) \ \| \) \ \| "/-r$nul/" "$guard" \ diff --git a/Completion/X/Command/_xterm b/Completion/X/Command/_xterm index 6d98985e7..180c2eb21 100644 --- a/Completion/X/Command/_xterm +++ b/Completion/X/Command/_xterm @@ -3,7 +3,7 @@ _xt_arguments \ -+{132,ah,ai,aw,bc,bdc,cb,cjk_width,cm,cn,cu,dc,fbb,fbx,fullscreen,hf,hm,hold,ie,im,itc,j,k8,l,lc,ls,maximized,mb,mesg,mk_width,nul,pc,pob,rvc,rw,s,samename,sb,sf,si,sk,sm,sp,t,u8,uc,ulc,ulit,ut,vb,wc,wf} \ -{version,help,leftbar,rightbar,C} \ - '-report-'{charclass,colors,fonts} \ + '-report-'{charclass,colors,fonts,icons,xres} \ '-T:title' \ '-b:inner border size:' \ '-baudrate:rate [38400]' \ |