diff --git a/changelog.md b/changelog.md index 6c75259..120750c 100644 --- a/changelog.md +++ b/changelog.md @@ -77,7 +77,7 @@ - Fix an error message on stderr before every prompt when the `WARN_NESTED_VAR` zsh option is set: `_zsh_highlight_main__precmd_hook:1: array parameter _zsh_highlight_main__command_type_cache set in enclosing scope in function _zsh_highlight_main__precmd_hook` - [#727, #731] + [#727, #731, #732, #733] # Changes in version 0.7.1 diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index e4a17e0..59d4036 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -1692,7 +1692,7 @@ _zsh_highlight_main__precmd_hook() { # Unset the WARN_NESTED_VAR option, taking care not to error if the option # doesn't exist (zsh older than zsh-5.3.1-test-2). setopt localoptions - if [[ -o warnnestedvar ]] 2>/dev/null; then + if eval '[[ -o warnnestedvar ]]' 2>/dev/null; then unsetopt warnnestedvar fi