diff options
Diffstat (limited to 'Completion/X/Command')
-rw-r--r-- | Completion/X/Command/.distfiles | 39 | ||||
-rw-r--r-- | Completion/X/Command/_gv | 2 | ||||
-rw-r--r-- | Completion/X/Command/_matlab | 19 | ||||
-rw-r--r-- | Completion/X/Command/_okular | 10 | ||||
-rw-r--r-- | Completion/X/Command/_pdftk | 63 | ||||
-rw-r--r-- | Completion/X/Command/_vnc | 68 | ||||
-rw-r--r-- | Completion/X/Command/_xournal | 6 | ||||
-rw-r--r-- | Completion/X/Command/_xrandr | 59 | ||||
-rw-r--r-- | Completion/X/Command/_xset | 4 |
9 files changed, 242 insertions, 28 deletions
diff --git a/Completion/X/Command/.distfiles b/Completion/X/Command/.distfiles index 8ad17e1ac..3b6dc49fa 100644 --- a/Completion/X/Command/.distfiles +++ b/Completion/X/Command/.distfiles @@ -1,14 +1,35 @@ DISTFILES_SRC=' .distfiles -_acroread _dcop -_gnome-gv _gqview _gv _kfmclient -_mozilla _mplayer _nautilus -_nedit _netscape -_qiv +_acroread +_dcop +_gnome-gv +_gqview +_gv +_kfmclient +_matlab +_mozilla +_mplayer +_nautilus +_nedit +_netscape +_okular +_pdftk +_qiv _setxkbmap -_urxvt _vnc -_x_utils _xauth _xdvi _xfig _xloadimage -_xmodmap _xpdf _xscreensaver _xset _xterm -_xv _xwit +_urxvt +_vnc +_x_utils +_xauth +_xdvi +_xfig +_xloadimage +_xmodmap +_xournal +_xpdf +_xscreensaver +_xset +_xterm +_xv +_xwit _xrandr ' diff --git a/Completion/X/Command/_gv b/Completion/X/Command/_gv index 6075de508..d4dbed089 100644 --- a/Completion/X/Command/_gv +++ b/Completion/X/Command/_gv @@ -34,7 +34,7 @@ _arguments \ '--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)' \ - '--orientation=:orientation:' \ + '--orientation=:orientation:(landscape seascape upsidedown portrait)' \ '--scale=:scale entry:' \ '--scalebase=:scale base:' \ '--ad=:resource file:_files' \ diff --git a/Completion/X/Command/_matlab b/Completion/X/Command/_matlab new file mode 100644 index 000000000..64d076f43 --- /dev/null +++ b/Completion/X/Command/_matlab @@ -0,0 +1,19 @@ +#compdef matlab + +_arguments : \ + {-h,-help}'[Display arguments.]' \ + '(-e)-n[Display final environment variables, and exit]' \ + '(-n)-e[Display ALL the environment variables and values, and exit]' \ + '-arch[Start MATLAB assuming architecture arch]:architecture:' \ + '-c[Set location of the license file]:licensefile:_files' \ + '(-nodisplay)-display:display:_x_display' \ + '(-display)-nodisplay[Do not display any X commands.]' \ + '-nosplash[Do not display the splash screen during startup.]' \ + '-mwvisual[The default X visual to use for figure windows.]:visualid:' \ + '-debug[Provide debugging information especially for X based problems.]' \ + '(-nodesktop -nojvm)-desktop[Allow the MATLAB desktop to be started by a process without a controlling terminal.]' \ + '(-desktop -nojvm)-nodesktop[Do not start the MATLAB desktop.]' \ + '(-nodesktop -desktop)-nojvm[Shut off all Java support by not starting the Java virtual machine.]' \ + '-r[Start MATLAB and execute the MATLAB_command.]:MATLAB_command:' \ + '-logfile[Make a copy of any output to the command window in file log.]:log file:' \ + '-D-:debugger:_path_commands' diff --git a/Completion/X/Command/_okular b/Completion/X/Command/_okular new file mode 100644 index 000000000..0b81e2f9d --- /dev/null +++ b/Completion/X/Command/_okular @@ -0,0 +1,10 @@ +#compdef okular +local extns + +extns="{pdf,ps,eps,dvi}(.gz|.bz2)(#c,1)|djvu|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)(-.)'" diff --git a/Completion/X/Command/_pdftk b/Completion/X/Command/_pdftk new file mode 100644 index 000000000..b8c43f754 --- /dev/null +++ b/Completion/X/Command/_pdftk @@ -0,0 +1,63 @@ +#compdef pdftk + +_pdfwithhandle() +{ + compset -P '(#I)[A-Z]=' + _files "$@" -g '(#i)*.pdf' +} + +local expl +local -a opts operations + +opts=(output encrypt_40bit encrypt_128bit allow owner_pw user_pw flatten + compress uncompress keep_first_id keep_final_id drop_xfa verbose + dont_ask do_ask) +operations=(cat attach_files unpack_files burst fill_form background stamp + generate_fdf multibackground multistamp dump_data dump_data_fields + update_info) + +case $words[CURRENT-1] in + ((input|owner|user)_pw) + _message "password, or PROMPT" + ;; + + (allow) + #_description permissions expl "permission" + #compadd $expl \ + _values -s , permissions \ + Printing DegradedPrinting ModifyContents Assembly CopyContents \ + ScreenReaders ModifyAnnotations FillIn AllFeatures + ;; + + (attach_files) + _files "$@" + ;; + + (fill_form) + _description files expl 'FDF and XFDF files' + _files "$@" $expl -g '(#i)*.(fdf|xfdf)' + ;; + + ((multibackground|background|stamp|multistamp|output)) + _description files expl 'PDF files' + _files "$@" $expl -g '(#i)*.pdf' + ;; + + (update_info) + _files + ;; + + (*) + false + ;; +esac && return 0 + +if [[ -n $words[(r)(${(j:|:)operations})] ]]; then + _description options expl "options" + compadd $@ $expl $opts +else + _tags files operations + _alternative \ + 'files:PDF files:_pdfwithhandle' \ + "operations:operations:($operations)" +fi diff --git a/Completion/X/Command/_vnc b/Completion/X/Command/_vnc index 347eb8ef4..70b897e47 100644 --- a/Completion/X/Command/_vnc +++ b/Completion/X/Command/_vnc @@ -6,13 +6,78 @@ displays=( \\${^displays} ) case $service in vncserver) - # currently lacking Xvnc arguments + # currently missing: bc, c, nologo, r, ttyxx, v + # Don't know values for -nolisten (other than tcp). _arguments \ - start \ '-name:desktop name:_x_name' \ + '-a[mouse acceleration (pixels)]:#:' \ + '-ac[disable access control restrictions]' \ + '-audit[set audit trail level]:int:' \ + '-auth[select authorization file]:file:_files' \ + '-bs[disable any backing store support]' \ + '-c[turns off key-click]' \ + '-cc[default color visual class]:int:' \ + '-co[color database file]:file:_files' \ + '-core[generate core dump on fatal error]' \ + '-dpi[screen resolution in dots per inch]:int:' \ + '-deferglyphs[defer loading of glyphs]:type:(none all 16)' \ + '-f[bell base]:level (0-100):' \ + '-fc[cursor font]:string:' \ + '-fn[default font name]:string:' \ + '-fp[default font path]:string:' \ + '-help[prints message with these options]' \ + '-I[ignore all remaining arguments]' \ + '-ld[limit data space to N Kb]:int:' \ + '-lf[limit number of open files to N]:int:' \ + '-ls[limit stack space to N Kb]:int:' \ + '-nolock[disable the locking mechanism]' \ + '-logo[enable logo in screen saver]' \ + '-nolisten[dont listen on protocol]:protocol:(tcp)' \ + '-p[screen-saver pattern duration (minutes)]:time (minutes):' \ + '-pn[accept failure to listen on all ports]' \ + '-nopn[reject failure to listen on all ports]' \ + '-r[turns off auto-repeat]' \ + '-s[screen-saver timeout (minutes)]:timeout (minutes):' \ + '-su[disable any save under support]' \ + '-t[mouse threshold]:pixels:' \ + '-terminate[terminate at server reset]' \ + '-to[connection time out]:time:' \ + '-tst[disable testing extensions]' \ + '-v[screen-saver without video blanking]' \ + '-wm[WhenMapped default backing-store]' \ + '-x[loads named extension at init time ]:string:' \ + '-query[contact named host for XDMCP]:host-name:_hosts' \ + '-broadcast[broadcast for XDMCP]' \ + '-indirect[contact named host for indirect XDMCP]:host-name:_hosts' \ + '-port[UDP port number to send messages to]:port:' \ + '-once[Terminate server after one session]' \ + '-class[specify display class to send in manage]:display-class:' \ + '-cookie[specify the magic cookie for XDMCP]:xdm-auth-bits:' \ + '-displayID[manufacturer display ID for request]:display-id:' \ '-geometry:geometry:(1600x1200 1280x1024 1152x864 1024x768 800x600 640x480)' \ '-depth:pixel depth:(8 16 24 32)' \ '-pixelformat:pixel format' \ + '-udpinputport[UDP port for keyboard/pointer data]:port:' \ + '-rfbport[TCP port for RFB protocol]:port:' \ + '-rfbwait[max time in ms to wait for RFB client]:time:' \ + '-nocursor[dont put up a cursor]' \ + '-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):' \ + '-economictranslate[less memory-hungry translation]' \ + '-lazytight[disable "gradient" filter in tight encoding]' \ + '-desktop[VNC desktop name (default x11)]:name:' \ + '-alwaysshared[always treat new clients as shared]' \ + '-nevershared[never treat new clients as shared]' \ + '-dontdisconnect[dont disconnect existing clients for new non-shared connections]' \ + '-viewonly[let clients only to view the desktop]' \ + '-localhost[only allow connections from localhost]' \ + '-interface[only bind to specified interface address]:ipaddr:' \ + '-inetd[Xvnc is launched by inetd]' \ + '-compatiblekbd[set META key = ALT key as in the original VNC]' \ + '-version[report Xvnc version on stderr]' \ '1:: :_guard "(|:[0-9]#)" "display number"' \ - kill \ "-kill:display number:($displays)" \ @@ -25,6 +90,7 @@ case $service in '-depth:depth' \ '-passwd:file:_files' \ '(1)-listen:display number' \ + '-via:host:_hosts' \ '(-listen)1::display:_x_display' ;; esac diff --git a/Completion/X/Command/_xournal b/Completion/X/Command/_xournal new file mode 100644 index 000000000..066ef55f5 --- /dev/null +++ b/Completion/X/Command/_xournal @@ -0,0 +1,6 @@ +#compdef xournal + +local expl + +_description files expl 'PDF and Xournal files' +_files "$@" "$expl[@]" -g '*.(#i){xoj,pdf}(-.)' diff --git a/Completion/X/Command/_xrandr b/Completion/X/Command/_xrandr index 56d770e4d..2e51d0d23 100644 --- a/Completion/X/Command/_xrandr +++ b/Completion/X/Command/_xrandr @@ -1,4 +1,11 @@ #compdef xrandr +local context state line +typeset -A opt_args +local outputs modes expl + +# User configurable. TODO -- styles? +outputs=(LVDS1 TV1 VGA1) +modes=(1280x800 1024x768 800x600 640x480) _arguments \ '(-d -display)'{-d,-display}':X display:_x_display' \ @@ -6,28 +13,50 @@ _arguments \ '(-o --orientation)'{-o,--orientation}':rotation:(normal inverted left right 0 1 2 3)' \ '(-q --query)'{-q,--query}'[display current state]' \ '(-s --size)'{-s,--size}':size:' \ - '(-r --rate --refresh)'{-r,--rate,--refresh}':target refresh rate:' \ + '(-r --rate --refresh)'{*-r,*--rate,*--refresh}':target refresh rate:' \ '(-v --version)'{-v,--version}'[display version]' \ '-x[reflect across X axis]' \ '-y[reflect across Y axis]' \ '--screen:X screen number' \ '--verbose[be more verbose]' \ '--dryrun' \ + '--nograb' \ '(--prop --properties)'{--prop,--properties}'[display the contents of properties for each output]' \ '--fb:size:' \ '--fbmm:size:' \ '--dpi:dpi:' \ - '--output:output to reconfigure:' \ - '--auto' \ - '--mode:mode:' \ - '--preferred' \ - '--pos:position:' \ - '--reflect:axes:(normal x y xy)' \ - '--rotate:rotation:(normal inverted left right)' \ - '--left-of:output' \ - '--right-of:output' \ - '--above:output' \ - '--below:output' \ - '--same-as:output' \ - '--off[disable the output]' \ - '--crtc:crtc to use:' + "*--output:output to reconfigure:($outputs)" \ + '*--auto' \ + "*--mode:mode:($modes)" \ + '*--preferred' \ + '*--pos:position:' \ + '*--reflect:axes:(normal x y xy)' \ + '*--rotate:rotation:(normal inverted left right)' \ + "*--left-of:relative position to:($outputs)" \ + "*--right-of:relative position to:($outputs)" \ + "*--above:relative position to:($outputs)" \ + "*--below:relative position to:($outputs)" \ + "*--same-as:relative position to:($outputs)" \ + '*--set:property:(Backlight scaling\ mode):value:->value' \ + '*--scale:output scaling:' \ + '*--transform:transformation matrix:' \ + '*--off[disable the output]' \ + '*--crtc:crtc to use:' \ + '*--panning:panning:' \ + '*--gamma:r\:g\:b:' \ + '*--primary' \ + '--noprimary' \ + '*--newmode:name: :clock MHz: :hdisp: :hsync-start: :hsync-end: :htotal: :vdisp: :vsync-start: :vsync-end: :vtotal:' \ + '*--rmmode:Mode name:' \ + "*--addmode:output:($outputs):name:" \ + "*--delmode:output:($outputs):name:" \ + && return 0 + +if [[ $state == value ]]; then + case $words[CURRENT-1] in + (scaling* mode) + _description value expl "output property 'scaling mode'" + compadd "$@" "$expl[@]" None Full Center Full\ aspect && return 0 + ;; + esac +fi diff --git a/Completion/X/Command/_xset b/Completion/X/Command/_xset index 819a2040d..53ec635d4 100644 --- a/Completion/X/Command/_xset +++ b/Completion/X/Command/_xset @@ -27,8 +27,8 @@ _xset_compopts () { tmp=("$tmp[@]" "$opt") fi done - _describe -o options tmp -- || - _describe -o options allopts -- + _describe -O options tmp -- || + _describe -O options allopts -- } _xset_compfpadd () { |