diff options
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r-- | Completion/Unix/Command/.distfiles | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_lp | 196 | ||||
-rw-r--r-- | Completion/Unix/Command/_tex | 29 | ||||
-rw-r--r-- | Completion/Unix/Command/_xournal | 6 |
4 files changed, 132 insertions, 101 deletions
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles index 3fcf8cc0f..a0ac7f8f5 100644 --- a/Completion/Unix/Command/.distfiles +++ b/Completion/Unix/Command/.distfiles @@ -207,6 +207,7 @@ _tardy _tcpdump _tcptraceroute _telnet +_tex _texinfo _tidy _tiff @@ -240,7 +241,6 @@ _wiggle _xargs _xmlsoft _xmms2 -_xournal _yafc _yodl _yp diff --git a/Completion/Unix/Command/_lp b/Completion/Unix/Command/_lp index e6bff64cc..5d46a75bb 100644 --- a/Completion/Unix/Command/_lp +++ b/Completion/Unix/Command/_lp @@ -1,7 +1,5 @@ #compdef lp lpr lpq lprm lpoptions lpstat -local expl ret=1 printer list disp strs shown - _lp_get_printer() { # No reason to call _lp_get_printer when service == lpstat. Others matched @@ -22,6 +20,7 @@ _lp_get_printer() _lp_job_options() { + local expl printer local -a lopts_with_args lopts_no_args # Generic options (from lp manual page) @@ -84,6 +83,9 @@ _lp_job_options() _lp_list_jobs() { + local ret=1 printer shown + local -a list disp strs + _lp_get_printer [[ -n "$printer" ]] && printer=(-P $printer) @@ -125,95 +127,101 @@ _lp_list_jobs() return 1 } -case $service in - (lpq) - _arguments \ - '-E[Force encryption]' \ - '-U:username (for connection to server):_users' \ - '-h:alternate server:_hosts' \ - '(-a)-P+[destination printer]:printers:_printers' \ - '(-P)-a[all printers]' \ - '-l[long listing]' \ - '*:poll interval (+seconds):' - ;; - - (lprm) - _arguments \ - '-E[Force encryption]' \ - '-U:username (for connection to server):_users' \ - '-h:alternate server:_hosts' \ - '-P+[destination printer]:printers:_printers' \ - '*:job ids:_lp_list_jobs' - ;; - - (lpoptions) - _arguments \ - '-E[Force encryption]' \ - '-U:username (for connection to server):_users' \ - '-h:alternate server:_hosts' \ - '(-p -l -r -x)-d[set default printer]:printers:_printers' \ - '(-l -x)*-o:job options:_lp_job_options' \ - '(-d -x)-p[destination printer for options]:printers:_printers' \ - '(-d -o -r -x)-l[list options]' \ - '(-d -l -x)*-r:remove option:_lp_job_options' \ - '(-d -l -r -o)-x[remove all options]:printers:_printers' - ;; - - (lpstat) - _arguments \ - '-E[Force encryption]' \ - '-R[Shows print job ranking]' \ - '-U:username (for connection to server):_users' \ - '-W:which jobs:(completed not-completed)' \ - '-a[Show accepting state]:printers:_printers' \ - '-c:printer classes:' \ - '-d[Show current default destination]' \ - '-h:hostname (alternate server):_hosts' \ - '-l[long listing]' \ - '-o[destinations]:printers:_printers' \ - '-p:printers:_printers' \ - '-r[CUPS server running status]' \ - '-s[Status summary]' \ - '-t[All status info]' \ - '-u[list jobs by users]:users:_users' \ - '-v[show devices]:printers:_printers' - ;; - - (lpr) - _arguments \ - '-E[Force encryption]' \ - '-H:hostname (alternate server):_hosts' \ - '(-C -J -T)'-{C,J,T}':job name:' \ - '-P+[destination printer]:printers:_printers' \ - '-U:username (for connection to server):_users' \ - '-#[Copies]:copies (1--100):' \ - '-h[Disables banner printing]' \ - '-l[raw file]' \ - '-m[Send an email on job completion]' \ - '*-o:print job options:_lp_job_options' \ - '-p[format with shaded header incl. date, time etc.]' \ - '-q[Hold job for printing.]' \ - '-r[delete files after printing]' \ - '*:PS/PDF files:_pspdf' - ;; - - (lp) - _arguments \ - '-E[Force encryption]' \ - '-U[username (for connection to server)]:username:_users' \ - '-c[(OBSOLETE) copy to spool dir before printing]' \ - '-d[destination printer]:printers:_printers' \ - '-h:hostname (alternate server):_hosts' \ - '-i[job id to modify]:job id:' \ - '-m[Send an email on job completion]' \ - '-n[Copies]:copies (1--100):' \ - '*-o:print job options:_lp_job_options' \ - '-q[Job priority -- 1 (lowest) to 100 (highest)]:priority:' \ - '-s[Dont report resulting job IDs]' \ - '-t[Sets the job name]:job name:' \ - '-u[job submission username]:username:_users' \ - '-H[Time to print]:print time (or enter hh\:mm):(hold immediate restart resume)' \ - '-P:page range list:' \ - '*:PS/PDF files:_pspdf' - ;; -esac + +_lp() +{ + case $service in + (lpq) + _arguments \ + '-E[Force encryption]' \ + '-U:username (for connection to server):_users' \ + '-h:alternate server:_hosts' \ + '(-a)-P+[destination printer]:printers:_printers' \ + '(-P)-a[all printers]' \ + '-l[long listing]' \ + '*:poll interval (+seconds):' + ;; + + (lprm) + _arguments \ + '-E[Force encryption]' \ + '-U:username (for connection to server):_users' \ + '-h:alternate server:_hosts' \ + '-P+[destination printer]:printers:_printers' \ + '*:job ids:_lp_list_jobs' + ;; + + (lpoptions) + _arguments \ + '-E[Force encryption]' \ + '-U:username (for connection to server):_users' \ + '-h:alternate server:_hosts' \ + '(-p -l -r -x)-d[set default printer]:printers:_printers' \ + '(-l -x)*-o:job options:_lp_job_options' \ + '(-d -x)-p[destination printer for options]:printers:_printers' \ + '(-d -o -r -x)-l[list options]' \ + '(-d -l -x)*-r:remove option:_lp_job_options' \ + '(-d -l -r -o)-x[remove all options]:printers:_printers' + ;; + + (lpstat) + _arguments \ + '-E[Force encryption]' \ + '-R[Shows print job ranking]' \ + '-U:username (for connection to server):_users' \ + '-W:which jobs:(completed not-completed)' \ + '-a[Show accepting state]:printers:_printers' \ + '-c:printer classes:' \ + '-d[Show current default destination]' \ + '-h:hostname (alternate server):_hosts' \ + '-l[long listing]' \ + '-o[destinations]:printers:_printers' \ + '-p:printers:_printers' \ + '-r[CUPS server running status]' \ + '-s[Status summary]' \ + '-t[All status info]' \ + '-u[list jobs by users]:users:_users' \ + '-v[show devices]:printers:_printers' + ;; + + (lpr) + _arguments \ + '-E[Force encryption]' \ + '-H:hostname (alternate server):_hosts' \ + '(-C -J -T)'-{C,J,T}':job name:' \ + '-P+[destination printer]:printers:_printers' \ + '-U:username (for connection to server):_users' \ + '-#[Copies]:copies (1--100):' \ + '-h[Disables banner printing]' \ + '-l[raw file]' \ + '-m[Send an email on job completion]' \ + '*-o:print job options:_lp_job_options' \ + '-p[format with shaded header incl. date, time etc.]' \ + '-q[Hold job for printing.]' \ + '-r[delete files after printing]' \ + '*:PS/PDF files:_pspdf' + ;; + + (lp) + _arguments \ + '-E[Force encryption]' \ + '-U[username (for connection to server)]:username:_users' \ + '-c[(OBSOLETE) copy to spool dir before printing]' \ + '-d[destination printer]:printers:_printers' \ + '-h:hostname (alternate server):_hosts' \ + '-i[job id to modify]:job id:' \ + '-m[Send an email on job completion]' \ + '-n[Copies]:copies (1--100):' \ + '*-o:print job options:_lp_job_options' \ + '-q[Job priority -- 1 (lowest) to 100 (highest)]:priority:' \ + '-s[Dont report resulting job IDs]' \ + '-t[Sets the job name]:job name:' \ + '-u[job submission username]:username:_users' \ + '-H[Time to print]:print time (or enter hh\:mm):(hold immediate restart resume)' \ + '-P:page range list:' \ + '*:PS/PDF files:_pspdf' + ;; + esac +} + +_lp "$@" diff --git a/Completion/Unix/Command/_tex b/Completion/Unix/Command/_tex new file mode 100644 index 000000000..9943fe10c --- /dev/null +++ b/Completion/Unix/Command/_tex @@ -0,0 +1,29 @@ +#compdef tex latex slitex pdftex pdflatex jadetex pdfjadetex xetex=tex xelatex=latex latexmk + +_arguments : \ + '-enc[enable encTeX extensions]' \ + '(-no-file-line-error -file-line-error)'{-no,}'-file-line-error[enable/disable file\:line\:error style messages]' \ + '-fmt=-[use FMTNAME instead of program name or a %& line]:FMTNAME:' \ + '-halt-on-error[stop processing at the first error]' \ + '-ini[be initex, for dumping formats]' \ + '-interaction[set interaction mode]:STRING:(batchmode nonstopmode scrollmode errorstopmode)' \ + '-ipc[send DVI output to a socket as well as the usual output file]' \ + '-ipc-start[as -ipc, and also start the server at the other end]' \ + '-jobname=-[set the job name]:STRING:' \ + '-kpathsea-debug=-[set path searching debugging flags according to the bits of NUMBER]:NUMBER:' \ + '(-no-mktex -mktex)'{-no,}'-mktex=-[enable/disable mktexFMT generation]:FMT:(tex tfm)' \ + '-mltex[enable MLTeX extensions]' \ + '-output-comment=-[DVI file comment]:STRING:' \ + '-output-directory=-[directory to write files to]:DIR:' \ + '(-no-parse-first-line -parse-first-line)'{-no,}'-parse-first-line[disable/enable parsing of the first line of the input file]' \ + '-progname=-[set program (and fmt) name]:STRING:' \ + '-recorder[enable filename recorder]' \ + '(-no-shell-escape -shell-escape)'{-no,}-shell-escape'[enable/disable \\write18{SHELL COMMAND}]' \ + '-shell-restricted[enable restricted \\write18]' \ + '-src-specials[insert source specials into the DVI file]' \ + '-src-specials=-[insert source specials in certain places of the DVI file]:WHERE:_values -s , WHERE cr display hbox math par parend vbox' \ + '-translate-file=-[use the TCX file TCXNAME]:TCXNAME:' \ + '-8bit[make all characters printable by default]' \ + '-help[display this help and exit]' \ + '-version[output version information and exit]' \ + '*:TeX or LaTeX file:_files -g "*.(tex|TEX|texinfo|texi)(-.)"' diff --git a/Completion/Unix/Command/_xournal b/Completion/Unix/Command/_xournal deleted file mode 100644 index 066ef55f5..000000000 --- a/Completion/Unix/Command/_xournal +++ /dev/null @@ -1,6 +0,0 @@ -#compdef xournal - -local expl - -_description files expl 'PDF and Xournal files' -_files "$@" "$expl[@]" -g '*.(#i){xoj,pdf}(-.)' |