summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_lp28
-rw-r--r--Completion/X/Command/_gv1
3 files changed, 24 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 988cdec75..1c1a924ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2019-05-06 Oliver Kiddle <okiddle@yahoo.co.uk>
+ * Gautam Iyer: gitlab !7: Completion/Unix/Command/_lp,
+ Completion/X/Command/_gv: Minor fixes to lp and gv completion
+
* Doron Behar: gitlab !8: Completion/Unix/Command/_luarocks:
Support completion of installed lua rocks' versions
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 | \
diff --git a/Completion/X/Command/_gv b/Completion/X/Command/_gv
index d4dbed089..cde8a1c1a 100644
--- a/Completion/X/Command/_gv
+++ b/Completion/X/Command/_gv
@@ -22,7 +22,6 @@ _arguments \
'(--watch)--nowatch' \
'(--noresize)--resize' \
'(--resize)--noresize' \
- '(--grayscale --color)--monochrome' \
'(--monochrome --color)--grayscale' \
'(--grayscale --color)--monochrome' \
'(--landscape --seascape --upsidedown)--portrait' \