diff options
author | Gautam Iyer <gautam@math.cmu.edu> | 2019-02-10 16:42:22 -0500 |
---|---|---|
committer | Oliver Kiddle <okiddle@yahoo.co.uk> | 2019-05-07 00:06:39 +0200 |
commit | f7850406c993ceb2d8924ae428585e91c569aab0 (patch) | |
tree | 6db765a8761fc3ec41b4d44dd5da1fc07aa84cd7 /Completion/Unix/Command/_lp | |
parent | 6bf8c4720da20a73f8ebde151c761c3766e12b4b (diff) | |
download | zsh-f7850406c993ceb2d8924ae428585e91c569aab0.tar.gz zsh-f7850406c993ceb2d8924ae428585e91c569aab0.tar.xz zsh-f7850406c993ceb2d8924ae428585e91c569aab0.zip |
gitlab !7: Minor fixes to _lp and _gv completion
Diffstat (limited to 'Completion/Unix/Command/_lp')
-rw-r--r-- | Completion/Unix/Command/_lp | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/Completion/Unix/Command/_lp b/Completion/Unix/Command/_lp index 49bb7fbac..e84d9ad04 100644 --- a/Completion/Unix/Command/_lp +++ b/Completion/Unix/Command/_lp @@ -24,13 +24,14 @@ _lp_get_printer() _lp_job_options() { local expl printer - local -a lopts_with_args lopts_no_args + local -a lopts_with_args lopts_no_args desc_opts # Generic options (from lp manual page) - lopts_with_args=( media orientation-requested sides number-up scaling cpi lpi - page-{bottom,left,right,top} page-ranges ) + lopts_with_args=(collate job-{hold-until,priority,sheets} media + number-up{,-layout} orientation-requested outputorder page-border + page-ranges sides) - lopts_no_args=(fitplot fit-to-page landscape) + lopts_no_args=(fit-to-page mirror) if [[ $service == 'lpadmin' ]]; then # Extra options from lpadmin man page. @@ -51,7 +52,11 @@ _lp_job_options() compadd "$@" a4 letter legal ;; (orientation-requested) - compadd "$@" 4 + desc_opts=( + '4:rotated 90 degrees counter-clockwise' + '5:rotated 90 degrees clockwise' + '6:rotated 180 degrees') + _describe "orientation requested" desc_opts ;; (sides) compadd "$@" one-sided two-sided-{long,short}-edge @@ -60,8 +65,9 @@ _lp_job_options() _description -V option-o-1 expl "pages per sheet" compadd "$expl[@]" 2 4 6 9 16 ;; - (scaling|cpi|lpi|page-(bottom|left|right|top)) - return 0; # Don't complete anything + (number-up-layout) + _description -V option-o-1 expl "layout" + compadd "$expl[@]" btlr btrl lrbt lrtb rlbt rltb tblr tbrl ;; (cupsIPPSupplies|cupsSNMPSupplies|printer-is-shared) compadd "$@" true false @@ -69,6 +75,14 @@ _lp_job_options() (printer-error-policy) compadd "$@" abort-job retry-job retry-current-job stop-printer ;; + (Duplex|BRDuplex) + desc_opts=( + "DuplexTumble:flip short side" + "DuplexNoTumble:flip long side" + "None") + _describe "duplex options" desc_opts + ;; + (*) compadd "$@" \ $(_call_program list-printer-options lpoptions $printer -l | \ |