mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-26 20:16:33 +00:00
Add simple pattern for command-line options
This commit is contained in:
1 parent
49e2073910
commit
396e1ac6b6
1 file changed
+9
+9
@@ -42,3 +42,12 @@ contexts:
|
||||
2: keyword.operator
|
||||
3: constant.numeric
|
||||
4: keyword.operator
|
||||
|
||||
# command-line options like --option=value, --some-flag, or -x
|
||||
- match: '(?:[^a-zA-Z0-9_-]|^|\s)(--?[A-Za-z0-9][A-Za-z0-9-]*)(?:(=)?("?)([A-Za-z0-9]+)("?))?'
|
||||
captures:
|
||||
1: entity.name
|
||||
2: keyword.operator
|
||||
3: punctuation.definition.string.begin
|
||||
4: variable.parameter
|
||||
3: punctuation.definition.string.end
|
||||
Reference in new issue
Block a user