add ccat support

Signed-off-by: ivan <qw7692336@gmail.com>
This commit is contained in:
ivan 2016-02-22 15:06:06 +08:00
parent bd6dbd1d9b
commit 2b2cef6515

View File

@ -6,6 +6,12 @@
alias colorize='colorize_via_pygmentize' alias colorize='colorize_via_pygmentize'
colorize_via_pygmentize() { colorize_via_pygmentize() {
# https://github.com/jingweno/ccat
if [ -x "$(which ccat)" ]; then
ccat $@
return 0
fi
if [ ! -x "$(which pygmentize)" ]; then if [ ! -x "$(which pygmentize)" ]; then
echo "package \'pygmentize\' is not installed!" echo "package \'pygmentize\' is not installed!"
return -1 return -1