mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
'main': Don't highlight unknown precommand flags as errors.
We cannot now for sure whether the flag is misspelled or simply unknown to us, so err on the side of caution. This fixes an unreleased regression. Fixes #658. Issue #641 was originally filed about this problem, but is left open to track further enhancements.
This commit is contained in:
parent
3a6f7e7bfe
commit
5012d771f3
3 changed files with 6 additions and 9 deletions
|
|
@ -38,6 +38,6 @@ expected_region_highlight=(
|
|||
'10 11 command' # ls
|
||||
'12 12 commandseparator' # ;
|
||||
'14 17 precommand' # sudo
|
||||
'19 20 unknown-token' # -x
|
||||
'22 23 command' # ls
|
||||
'19 20 single-hyphen-option' # -x
|
||||
'22 23 default' # ls
|
||||
)
|
||||
|
|
|
|||
|
|
@ -32,6 +32,6 @@ BUFFER='sudo --askpass ls'
|
|||
|
||||
expected_region_highlight=(
|
||||
'1 4 precommand' # sudo
|
||||
'6 14 double-hyphen-option "issues #641 and #658"' # --askpass
|
||||
'16 17 default "issues #641 and #658"' # ls (we don't know whether --askpass takes an argument)
|
||||
'6 14 double-hyphen-option' # --askpass
|
||||
'16 17 default' # ls (we don't know whether --askpass takes an argument)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue