'main': Highlight lone '!' correctly: it's not a history expansion.
While here, also add a test for the '!' reserved word (which is highlighted
since c216242b).
This commit is contained in:
@@ -28,10 +28,12 @@
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
ZSH_HIGHLIGHT_STYLES[default]=$unused_highlight
|
||||
BUFFER='!foo bar !baz'
|
||||
BUFFER='!foo bar !baz ! ; !'
|
||||
|
||||
expected_region_highlight=(
|
||||
"1 4 $ZSH_HIGHLIGHT_STYLES[history-expansion]" # !foo
|
||||
"6 8 $ZSH_HIGHLIGHT_STYLES[default]" # bar
|
||||
"10 13 $ZSH_HIGHLIGHT_STYLES[history-expansion]" # !baz
|
||||
"15 15 $ZSH_HIGHLIGHT_STYLES[default]" # ! (before the semicolon)
|
||||
"19 19 $ZSH_HIGHLIGHT_STYLES[reserved-word]" # ! (after the semicolon)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user