From 396931bb8730c7fc1ebaf0da6b8d513d0550e510 Mon Sep 17 00:00:00 2001 From: Christophe Bliard Date: Tue, 9 Jul 2013 13:51:52 +0200 Subject: [PATCH] Update colorize.plugin.zsh correctly detect when pygmentize is not installed do not exit shell if when pygmentize is not installed --- plugins/colorize/colorize.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh index 0696607d9..2132fa7be 100644 --- a/plugins/colorize/colorize.plugin.zsh +++ b/plugins/colorize/colorize.plugin.zsh @@ -6,9 +6,9 @@ alias colorize='colorize_via_pygmentize' colorize_via_pygmentize() { - if [ ! -x $(which pygmentize) ]; then - echo package \'pygmentize\' is not installed! - exit -1 + if [ ! -x "$(which pygmentize)" ]; then + echo "package \'pygmentize\' is not installed!" + return -1 fi if [ $# -eq 0 ]; then @@ -25,4 +25,4 @@ colorize_via_pygmentize() { pygmentize -g "$FNAME" fi done -} \ No newline at end of file +}