diff --git a/plugins/catimg/catimg.plugin.zsh b/plugins/catimg/catimg.plugin.zsh index ee721cd03..70ef9a63c 100644 --- a/plugins/catimg/catimg.plugin.zsh +++ b/plugins/catimg/catimg.plugin.zsh @@ -9,7 +9,7 @@ if [[ -x `which convert` ]]; then function catimg() { - source $ZSH/plugins/catimg/catimg.sh $@ + zsh $ZSH/plugins/catimg/catimg.sh $@ } else echo "catimg need convert (ImageMagick) to work)" diff --git a/plugins/catimg/catimg.sh b/plugins/catimg/catimg.sh index c05fddcd4..cd0f2e333 100755 --- a/plugins/catimg/catimg.sh +++ b/plugins/catimg/catimg.sh @@ -59,7 +59,7 @@ fi # Display the image I=0 -convert "$IMG" -resize $COLS\> +dither `echo $REMAP` txt:- | +convert "$IMG" -resize $COLS\> +dither `echo $REMAP` txt:- 2>/dev/null | sed -e 's/.*none.*/NO NO NO/g' -e '1d;s/^.*(\(.*\)[,)].*$/\1/g;y/,/ /' | while read R G B f; do if [ ! "$R" = "NO" ]; then