'main': Escape '!' within double-quoted strings.

This commit is contained in:
Daniel Shahaf
2016-10-19 23:27:54 +00:00
parent 1bdb88aee1
commit 28d7056a7a
2 changed files with 38 additions and 1 deletions

View File

@@ -810,7 +810,7 @@ _zsh_highlight_main_highlighter_highlight_string()
fi
;;
"\\") style=back-double-quoted-argument
if [[ \\\`\"\$ == *$arg[$i+1]* ]]; then
if [[ \\\`\"\$${histchars[1]} == *$arg[$i+1]* ]]; then
(( k += 1 )) # Color following char too.
(( i += 1 )) # Skip parsing the escaped char.
else