From 999d3ddf4cb4f263e9ea27b7ca0b5617c4ed19cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 8 Oct 2018 17:56:44 +0200 Subject: [PATCH] colorize: fix check for pygmentize (#7250) --- plugins/colorize/colorize.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh index b97dffe43..e2af6d25e 100644 --- a/plugins/colorize/colorize.plugin.zsh +++ b/plugins/colorize/colorize.plugin.zsh @@ -7,9 +7,9 @@ alias ccat='colorize_via_pygmentize' colorize_via_pygmentize() { - if [ ! -x "$(which pygmentize)" ]; then - echo "package \'Pygments\' is not installed!" - return -1 + if ! (( $+commands[pygmentize] )); then + echo "package 'Pygments' is not installed!" + return 1 fi if [ $# -eq 0 ]; then