summaryrefslogtreecommitdiff
path: root/plugins/colorize
diff options
context:
space:
mode:
authorcxy004 <cxy004@qq.com>2022-11-10 06:04:55 +0800
committerGitHub <noreply@github.com>2022-11-09 23:04:55 +0100
commit23de5d95285a6b119d7c99f777051d9c5ec69ef8 (patch)
treef8da2f576fa5c887c747d14ce17f44f1eb9a07e6 /plugins/colorize
parent9f77cb29d7557ec6ce453a7372b053931a7d034d (diff)
downloadzsh-23de5d95285a6b119d7c99f777051d9c5ec69ef8.tar.gz
zsh-23de5d95285a6b119d7c99f777051d9c5ec69ef8.tar.bz2
zsh-23de5d95285a6b119d7c99f777051d9c5ec69ef8.zip
fix(colorize): check if $ZSH_COLORIZE_TOOL exists (#11325)
Diffstat (limited to 'plugins/colorize')
-rw-r--r--plugins/colorize/colorize.plugin.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh
index a9da6cf83..12841e0ee 100644
--- a/plugins/colorize/colorize.plugin.zsh
+++ b/plugins/colorize/colorize.plugin.zsh
@@ -23,7 +23,7 @@ colorize_check_requirements() {
if [[ ${available_tools[(Ie)$ZSH_COLORIZE_TOOL]} -eq 0 ]]; then
echo "ZSH_COLORIZE_TOOL '$ZSH_COLORIZE_TOOL' not recognized. Available options are 'pygmentize' and 'chroma'." >&2
return 1
- elif (( $+commands["$ZSH_COLORIZE_TOOL"] )); then
+ elif ! (( $+commands[$ZSH_COLORIZE_TOOL] )); then
echo "Package '$ZSH_COLORIZE_TOOL' is not installed!" >&2
return 1
fi