23de5d95285a6b119d7c99f777051d9c5ec69ef8
- Author
- cxy004 <cxy004@qq.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
fix(colorize): check if $ZSH_COLORIZE_TOOL exists (#11325)
Diff
1diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh
2index a9da6cf83c11e236869b741508fd1488d04a9184..12841e0ee9e4d55d151024225ece63d8c2dbeeed 100644
3--- a/plugins/colorize/colorize.plugin.zsh
4+++ b/plugins/colorize/colorize.plugin.zsh
5@@ -23,7 +23,7 @@ colorize_check_requirements() {
6 if [[ ${available_tools[(Ie)$ZSH_COLORIZE_TOOL]} -eq 0 ]]; then
7 echo "ZSH_COLORIZE_TOOL '$ZSH_COLORIZE_TOOL' not recognized. Available options are 'pygmentize' and 'chroma'." >&2
8 return 1
9- elif (( $+commands["$ZSH_COLORIZE_TOOL"] )); then
10+ elif ! (( $+commands[$ZSH_COLORIZE_TOOL] )); then
11 echo "Package '$ZSH_COLORIZE_TOOL' is not installed!" >&2
12 return 1
13 fi