Skip to content
Browse files

Fixed a dirs bug for catimg

  • Loading branch information...
1 parent 0185d99 commit 349fa15b187a1b2c411db90f2022013caf3479e8 @posva committed Dec 9, 2013
Showing with 3 additions and 2 deletions.
  1. +1 −1 plugins/catimg/catimg.plugin.zsh
  2. +2 −1 plugins/catimg/catimg.sh
View
2 plugins/catimg/catimg.plugin.zsh
@@ -9,7 +9,7 @@
if [[ -x `which convert` ]]; then
function catimg() {
- source $(dirname $0)/catimg.sh $@
+ source $ZSH/plugins/catimg/catimg.sh $@
}
else
echo "catimg need convert (ImageMagick) to work)"
View
3 plugins/catimg/catimg.sh
@@ -43,7 +43,7 @@ if [ ! "$WIDTH" ]; then
else
COLS=$(expr $WIDTH "/" $(echo -n "$CHAR" | wc -c))
fi
-WIDTH=$(convert ${IMG} -print "%w\n" /dev/null)
+WIDTH=$(convert "$IMG" -print "%w\n" /dev/null)
if [ "$WIDTH" -gt "$COLS" ]; then
WIDTH=$COLS
fi
@@ -58,6 +58,7 @@ else
fi
# Display the image
+I=0
convert "$IMG" -resize $COLS\> +dither `echo $REMAP` txt:- |
sed -e 's/.*none.*/NO NO NO/g' -e '1d;s/^.*(\(.*\)[,)].*$/\1/g;y/,/ /' |
while read R G B f; do

0 comments on commit 349fa15

Please sign in to comment.
Something went wrong with that request. Please try again.