diff options
author | Eduardo San Martin Morote <posva13@gmail.com> | 2014-02-23 10:07:26 +0100 |
---|---|---|
committer | Eduardo San Martin Morote <posva13@gmail.com> | 2014-02-23 10:07:26 +0100 |
commit | 8309b0a19baa351d643194f897d59de7b3d3b3dd (patch) | |
tree | e9a9e6975be93b9ad717aec182141c502b83014e /plugins | |
parent | 44b23ae194a1580a6af6d692e4ba268d61828929 (diff) | |
download | zsh-8309b0a19baa351d643194f897d59de7b3d3b3dd.tar.gz zsh-8309b0a19baa351d643194f897d59de7b3d3b3dd.tar.bz2 zsh-8309b0a19baa351d643194f897d59de7b3d3b3dd.zip |
Verification of convert inside the function
Depending on when the path is declared this solution would work in any case
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/catimg/catimg.plugin.zsh | 13 |
1 files 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 +} |