Skip to content

Commit

Permalink
driver: Fix "_zsh_highlight:3: read-only variable: ret" warnings when…
Browse files Browse the repository at this point in the history
… POSIX_BUILTINS is set.

Fixes #719.

Cf. #688.
  • Loading branch information
danielshahaf committed Apr 3, 2020
1 parent 291634e commit 96eb2e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zsh-syntax-highlighting.zsh
Expand Up @@ -72,7 +72,9 @@ typeset -ga ZSH_HIGHLIGHT_HIGHLIGHTERS
_zsh_highlight()
{
# Store the previous command return code to restore it whatever happens.
readonly ret=$?
local ret=$?
# Make it read-only. Can't combine this with the previous line when POSIX_BUILTINS may be set.
typeset -r ret

# Remove all highlighting in isearch, so that only the underlining done by zsh itself remains.
# For details see FAQ entry 'Why does syntax highlighting not work while searching history?'.
Expand Down

0 comments on commit 96eb2e3

Please sign in to comment.