Unverified Commit 47d30784 authored by spreiter's avatar spreiter Committed by GitHub
Browse files

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.
parent 63922b5e
...@@ -6,7 +6,8 @@ alias cless="colorize_less" ...@@ -6,7 +6,8 @@ alias cless="colorize_less"
ZSH_COLORIZE_PLUGIN_PATH=$0:A ZSH_COLORIZE_PLUGIN_PATH=$0:A
colorize_check_requirements() { colorize_check_requirements() {
local available_tools=("chroma" "pygmentize") local -a available_tools
available_tools=("chroma" "pygmentize")
if [ -z "$ZSH_COLORIZE_TOOL" ]; then if [ -z "$ZSH_COLORIZE_TOOL" ]; then
if (( $+commands[pygmentize] )); then if (( $+commands[pygmentize] )); then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment