Verification of convert inside the function

Depending on when the path is declared this solution would work in any case
parent 44b23ae1
...@@ -7,10 +7,11 @@ ...@@ -7,10 +7,11 @@
# Github: https://github.com/posva/catimg # # 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 $@ zsh $ZSH/plugins/catimg/catimg.sh $@
} else
else
echo "catimg need convert (ImageMagick) to work)" echo "catimg need convert (ImageMagick) to work)"
fi fi
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment