From 563a8d2853bef30f72450cafaaa2fb23702fb7f7 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sun, 29 Apr 2018 23:22:44 +0200 Subject: 42728: update options in libtiff tools completion and add handling for tiff2pdf --- Completion/Unix/Command/_tiff | 199 +++++++++++++++++++++++++++--------------- 1 file changed, 130 insertions(+), 69 deletions(-) (limited to 'Completion/Unix/Command/_tiff') diff --git a/Completion/Unix/Command/_tiff b/Completion/Unix/Command/_tiff index 588476d5a..128aeb0c0 100644 --- a/Completion/Unix/Command/_tiff +++ b/Completion/Unix/Command/_tiff @@ -14,7 +14,7 @@ if [[ $# -ne 0 || $+_in_tiff -ne 0 ]]; then set -- "$expl[@]" fi _wanted files expl 'picture file' _path_files "$@" -g "$pat" - || - _files "$@" "$expl[@]" -g '*.(#i)tiff(-.)' + _files "$@" "$expl[@]" -g '*.(#i)tif(|f)(-.)' return fi @@ -26,87 +26,143 @@ typeset -A opt_args case "$service" in tiff2bw) _arguments -C \ - '-c[specify compression scheme]:compression scheme:->compress' \ - '-r[specify rows per strip]:rows per strip' \ - '-R[specify percentage of red channel]:percentage of red channel' \ - '-G[specify percentage of green channel]:percentage of green channel' \ - '-B[specify percentage of blue channel]:percentage of blue channel' \ + '-c+[specify compression scheme]:compression scheme:->compress' \ + '-r+[specify rows per strip]:rows per strip' \ + '-R+[specify percentage of red channel]:percentage' \ + '-G+[specify percentage of green channel]:percentage' \ + '-B+[specify percentage of blue channel]:percentage' \ ':input file:_files -g "*.(#i)tif(|f)(-.)"' \ ':output file:_files -g "*.(#i)tif(|f)(-.)"' && ret=0 ;; +tiff2pdf) + _arguments -s \ + '-o+[specify output file]:output file:_files -g "*.(#i)pdf(-.)"' \ + '(-z -d)-j[compress with JPEG]' \ + '(-j -d)-z[compress with Zip/Deflate]' \ + '-q+[specify compression quality]:quality' \ + '-n[no compressed data passthrough]' \ + "(-z -j)-d[don't compress]" \ + '-i[invert colors]' \ + '-u+[set distance unit]:unit:((i\:inches m\:centimeters))' \ + '-x+[set x resolution]:resolution (dots per unit)' \ + '-y+[set y resolution]:resolution (dots per unit)' \ + '-w+[specify width in units]:width' \ + '-l+[specify length in units]:length' \ + '-r+[specify scope for resolution settings]:scope:((d\:images\ without\ resolution o\:all\ images))' \ + '-p+[specify paper size]:paper size:(letter legal A4)' \ + '-F[make the tiff fill the PDF page]' \ + '-f[set PDF "Fit Window" user preference]' \ + '-e+[specify date]:date (YYYYMMDDHHMMSS)' \ + '-c+[set document creator, overrides image software default]:creator' \ + '-a+[set document author, overrides image artist default]:author' \ + '-t+[set document title, overrides image document name default]:title' \ + '-s+[set document subject, overrides image image description default]:subject' \ + '-k+[set document keywords]:keywords' \ + '-b[set PDF "Interpolate" user preference]' \ + '(- :)-h[display usage information]' \ + ':input file:_files -g "*.(#i)tif(|f)(-.)"' + ;; tiff2ps) - _arguments \ - '-1[generate PostScript Level I output]' \ - '-2[generate PostScript Level II output]' \ + _arguments -s \ + '!(-2 -3 -8 -m)-1' \ + '(-3)-2[generate PostScript Level 2 output]' \ + '(-2)-3[generate PostScript Level 3 output]' \ + '-8[disable use of ASCII85 encoding with PostScript Level 2/3]' \ '-a[generate output for all IFDs]' \ - '-d[set initial TIFF directory]:initial TIFF directory' \ - '(-p)-e[generate Encapsulated PostScript]' \ - '-o[set initial TIFF directory (file offset)]:file offset' \ + '-b+[set the bottom margin]:margin (inches)' \ + '-c[center image]' \ + '-C+[set postscript document creator name]:creator' \ + '-d+[set initial TIFF directory]:initial TIFF directory' \ + '(-e)-D[print two pages per sheet (duplex)]' \ + '(-p -D -T)-e[generate Encapsulated PostScript]' \ + '-h+[set printed page height]:height (inch