mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2026-01-29 22:54:40 +01:00
'main': Fix an issue whereby a --option was highlighted as a file
Regression test included. Fixes #578. Review-by: Matthew Martin
This commit is contained in:
parent
650dd79d86
commit
fd4c5db4c9
2 changed files with 42 additions and 2 deletions
|
|
@ -1045,9 +1045,10 @@ _zsh_highlight_main_highlighter_highlight_argument()
|
|||
highlights+=($reply)
|
||||
;;
|
||||
'$')
|
||||
path_eligible=0
|
||||
if [[ $arg[i+1] != "'" ]]; then
|
||||
path_eligible=0
|
||||
fi
|
||||
if [[ $arg[i+1] == "'" ]]; then
|
||||
path_eligible=1
|
||||
_zsh_highlight_main_highlighter_highlight_dollar_quote $i
|
||||
(( i = REPLY ))
|
||||
highlights+=($reply)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue