'main': Highlight errors from the EQUALS option.

Fixes #430.
This commit is contained in:
Daniel Shahaf
2020-03-17 04:13:50 +00:00
committed by Daniel Shahaf
parent 08839bbd87
commit 29ca0bc6c8
6 changed files with 154 additions and 0 deletions

View File

@@ -1122,6 +1122,11 @@ _zsh_highlight_main_highlighter_check_path()
REPLY=path
if [[ ${1[1]} == '=' && $1 == ??* && ${1[2]} != $'\x28' && $zsyh_user_options[equals] == 'on' && $expanded_path[1] != '/' ]]; then
REPLY=unknown-token # will error out if executed
return 0
fi
[[ -z $expanded_path ]] && return 1
# Check if this is a blacklisted path