3c41da3172325d90397baed7b27b4c675def8a51
- Author
- Christophe Bliard <christophe.bliard@trux.info>
- Committer
- ncanceill <nicolas.canceill@ens-cachan.org>
- Date
Message
Update colorize.plugin.zsh
correctly detect when pygmentize is not installed
do not exit shell if when pygmentize is not installed
Diff
1diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh
2index dc0947d4f55c732ef1b914964d8bc6d9a46e6ad5..11b58e69d0381dd78b102e135e6652ea09ff9d00 100644
3--- a/plugins/colorize/colorize.plugin.zsh
4+++ b/plugins/colorize/colorize.plugin.zsh
5@@ -6,9 +6,9 @@
6 alias colorize='colorize_via_pygmentize'
7
8 colorize_via_pygmentize() {
9- if [ ! -x $(which pygmentize) ]; then
10- echo package \'pygmentize\' is not installed!
11- exit -1
12+ if [ ! -x "$(which pygmentize)" ]; then
13+ echo "package \'pygmentize\' is not installed!"
14+ return -1
15 fi
16
17 if [ $# -eq 0 ]; then