From 8309b0a19baa351d643194f897d59de7b3d3b3dd Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Sun, 23 Feb 2014 10:07:26 +0100 Subject: [PATCH] Verification of convert inside the function Depending on when the path is declared this solution would work in any case --- plugins/catimg/catimg.plugin.zsh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/catimg/catimg.plugin.zsh b/plugins/catimg/catimg.plugin.zsh index 70ef9a63c..cb92f5986 100644 --- a/plugins/catimg/catimg.plugin.zsh +++ b/plugins/catimg/catimg.plugin.zsh @@ -7,10 +7,11 @@ # Github: https://github.com/posva/catimg # ################################################################################ -if [[ -x `which convert` ]]; then - function catimg() { + +function catimg() { + if [[ -x `which convert` ]]; then zsh $ZSH/plugins/catimg/catimg.sh $@ - } -else - echo "catimg need convert (ImageMagick) to work)" -fi + else + echo "catimg need convert (ImageMagick) to work)" + fi +}