catimg.plugin.zsh
945 bytes
1################################################################################
2# catimg script by Eduardo San Martin Morote aka Posva #
3# https://posva.net #
4# #
5# Output the content of an image to the stdout using the 256 colors of the #
6# terminal. #
7# GitHub: https://github.com/posva/catimg #
8################################################################################
9
10
11function catimg() {
12 if (( $+commands[magick] )); then
13 CONVERT_CMD="magick" zsh $ZSH/plugins/catimg/catimg.sh $@
14 elif (( $+commands[convert] )); then
15 CONVERT_CMD="convert" zsh $ZSH/plugins/catimg/catimg.sh $@
16 else
17 echo "catimg need magick/convert (ImageMagick) to work)"
18 fi
19}