From 9a53d98cf46601a6d26fb5fb8e4b1e12bc6846f9 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 1 Sep 2020 14:49:09 +0200 Subject: [PATCH] Perf: add comments explaining where the check for version 5.8 comes from --- highlighters/main/main-highlighter.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 47fd976..9468d05 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -181,7 +181,8 @@ _zsh_highlight_main__type() { REPLY=hashed fi # ZSH_VERSION >= 5.1 allows the use of #q. ZSH_VERSION <= 5.8 allows skipping - # 'type -w' calls that are necessary for forward compatibility. + # 'type -w' calls that are necessary for forward compatibility (5.8 is the latest + # zsh release at the time of writing). elif [[ $ZSH_VERSION == 5.<1-8>(|.*) ]]; then if [[ $1 == */* ]]; then if [[ -n $1(#q-.*N) || @@ -1765,6 +1766,7 @@ _zsh_highlight_main__precmd_hook() { _zsh_highlight_main__path_cache=() _zsh_highlight_main__arg_cache=() + # 5.8 is the latest zsh release at the time of writing. if [[ $ZSH_VERSION == (<0-4>.*|5.<0-8>(|.*)) ]]; then _zsh_highlight_main_calculate_styles fi