999d3ddf4cb4f263e9ea27b7ca0b5617c4ed19cb
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
colorize: fix check for pygmentize (#7250)
Diff
1diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh
2index b97dffe4376dc6518b35f1f0f4a4a0dae877d687..e2af6d25ebaad55c991ed20fb371bb33be25a82a 100644
3--- a/plugins/colorize/colorize.plugin.zsh
4+++ b/plugins/colorize/colorize.plugin.zsh
5@@ -7,9 +7,9 @@
6 alias ccat='colorize_via_pygmentize'
7
8 colorize_via_pygmentize() {
9- if [ ! -x "$(which pygmentize)" ]; then
10- echo "package \'Pygments\' is not installed!"
11- return -1
12+ if ! (( $+commands[pygmentize] )); then
13+ echo "package 'Pygments' is not installed!"
14+ return 1
15 fi
16
17 if [ $# -eq 0 ]; then