diff --git a/completions/convert b/completions/convert index b01633bae49..e873a347a14 100644 --- a/completions/convert +++ b/completions/convert @@ -49,7 +49,13 @@ _comp_cmd_convert__common_options() return ;; -format) - _comp_compgen_split -- "$(convert -list format | _comp_awk \ + # FIXME: We should probably accept the actual command being used + # here and run that, instead of calling `magick` or `convert` + # explicitly. + # `magick` is the new way to call the command in ImageMagick 7 + _comp_compgen_split -- "$({ + magick -list format 2>/dev/null || convert -list format + } | _comp_awk \ '/ [r-][w-][+-] / { sub("[*]$","",$1); print tolower($1) }')" return ;;