diff options
| author | Gentoo <43550690+maxutka99@users.noreply.github.com> | 2024-08-12 12:46:16 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-12 11:46:16 +0200 |
| commit | d6f84f3e7d2515cee8ba776d05ee2009ffd471d7 (patch) | |
| tree | 8e9406f25ea250d0a1644f8762973b329166bfa9 /plugins/catimg/catimg.plugin.zsh | |
| parent | 47767bd03cae60bc4b3d8ab4ba8e6b6c78bc17ed (diff) | |
| download | zsh-d6f84f3e7d2515cee8ba776d05ee2009ffd471d7.tar.gz zsh-d6f84f3e7d2515cee8ba776d05ee2009ffd471d7.tar.bz2 zsh-d6f84f3e7d2515cee8ba776d05ee2009ffd471d7.zip | |
fix(catimg): add support to `magick` binary (#12608)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
Diffstat (limited to 'plugins/catimg/catimg.plugin.zsh')
| -rw-r--r-- | plugins/catimg/catimg.plugin.zsh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/catimg/catimg.plugin.zsh b/plugins/catimg/catimg.plugin.zsh index f4ff6f856..ad10d8574 100644 --- a/plugins/catimg/catimg.plugin.zsh +++ b/plugins/catimg/catimg.plugin.zsh @@ -9,9 +9,11 @@ function catimg() { - if [[ -x `which convert` ]]; then - zsh $ZSH/plugins/catimg/catimg.sh $@ + if (( $+commands[magick] )); then + CONVERT_CMD="magick" zsh $ZSH/plugins/catimg/catimg.sh $@ + elif (( $+commands[convert] )); then + CONVERT_CMD="convert" zsh $ZSH/plugins/catimg/catimg.sh $@ else - echo "catimg need convert (ImageMagick) to work)" + echo "catimg need magick/convert (ImageMagick) to work)" fi } |
