From 47d30784c53ed3159fb317d4a1a1cedb105aa278 Mon Sep 17 00:00:00 2001 From: spreiter <36988897+spreiter@users.noreply.github.com> Date: Thu, 29 Oct 2020 11:54:29 +0100 Subject: [PATCH] colorize: add compatibility for zsh < 5.1 (#9400) The direct assignment of a local array is not possible in older ZSH version, as used by RHEL/CentOS 7. --- plugins/colorize/colorize.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh index 80b69190f..cb5ac36f5 100644 --- a/plugins/colorize/colorize.plugin.zsh +++ b/plugins/colorize/colorize.plugin.zsh @@ -6,7 +6,8 @@ alias cless="colorize_less" ZSH_COLORIZE_PLUGIN_PATH=$0:A colorize_check_requirements() { - local available_tools=("chroma" "pygmentize") + local -a available_tools + available_tools=("chroma" "pygmentize") if [ -z "$ZSH_COLORIZE_TOOL" ]; then if (( $+commands[pygmentize] )); then