From fb063f964937728104865a7dcbe6c1682ef5a99a Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 15 Aug 2015 00:33:20 +0200 Subject: 36172: _imagemagick: Use $formats a bit more correctly --- Completion/Unix/Command/_imagemagick | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Completion/Unix/Command/_imagemagick') diff --git a/Completion/Unix/Command/_imagemagick b/Completion/Unix/Command/_imagemagick index 115cb01e4..1fc6089c8 100644 --- a/Completion/Unix/Command/_imagemagick +++ b/Completion/Unix/Command/_imagemagick @@ -1,6 +1,7 @@ #compdef animate composite combine convert display identify import mogrify montage xtp -local state line expl formats curcontext="$curcontext" +local state line expl curcontext="$curcontext" +local -a formats typeset -A opt_args # Things that could be improved: @@ -11,10 +12,10 @@ typeset -A opt_args # # and certainly many other things... -formats=jpg:jpeg:jp2:j2k:jpc:jpx:jpf:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xcf:xwd:xbm:xpm:yuv +formats=(jpg jpeg jp2 j2k jpc jpx jpf tiff miff ras bmp cgm dcx ps eps fig fits fpx gif mpeg pbm pgm ppm pcd pcl pdf pcx png rad rgb rgba rle sgi html shtml tga ttf uil xcf xwd xbm xpm yuv) if (( $# )); then - _files "$@" -g "*.(#i)(${~formats//:/|})(-.)" + _files "$@" -g "*.(#i)(${(j:|:)formats})(-.)" return fi @@ -444,7 +445,7 @@ case "$service" in '*-filter:filter type for resizing:(Point Box Triangle Hermite Hanning Hamming Blackman Gaussian Quadratic Cubic Catrom Mitchell Lanczos Bessel Sinc)' \ '*-flip[vertical mirror image]' \ '*-flop[horizontal mirror image]' \ - "*-format:output file format:(${formats//:/ })" \ + "*-format:output file format:($formats)" \ '*-font:annotation font:_x_font' \ '*-frame:border dimensions (x++)' \ '*-fuzz:maximum distance for equal colors' \ -- cgit 1.4.1