From 2b2cef6515393aa80cc0d3712ce3fbc390c5d6ec Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 22 Feb 2016 15:06:06 +0800 Subject: [PATCH] add ccat support Signed-off-by: ivan --- plugins/colorize/colorize.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh index 11b58e69..6ecdf59b 100644 --- a/plugins/colorize/colorize.plugin.zsh +++ b/plugins/colorize/colorize.plugin.zsh @@ -6,6 +6,12 @@ alias colorize='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 echo "package \'pygmentize\' is not installed!" return -1