Skip to content

Commit 4509832

Browse files
authored
Merge pull request #1377 from yedayak/convert-im7
fix(convert): Try calling magick, for IM7
2 parents fd4c323 + ba0b8b9 commit 4509832

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

completions/convert

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ _comp_cmd_convert__common_options()
4949
return
5050
;;
5151
-format)
52-
_comp_compgen_split -- "$(convert -list format | _comp_awk \
52+
# FIXME: We should probably accept the actual command being used
53+
# here and run that, instead of calling `magick` or `convert`
54+
# explicitly.
55+
# `magick` is the new way to call the command in ImageMagick 7
56+
_comp_compgen_split -- "$({
57+
magick -list format 2>/dev/null || convert -list format
58+
} | _comp_awk \
5359
'/ [r-][w-][+-] / { sub("[*]$","",$1); print tolower($1) }')"
5460
return
5561
;;

0 commit comments

Comments
 (0)