mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-18 20:11:03 +00:00
Fix for OPTIONS consisting of a plain dash
This commit is contained in:
parent
caba54efc9
commit
b7b05a3553
@ -85,6 +85,9 @@ contexts:
|
|||||||
|
|
||||||
options:
|
options:
|
||||||
# command-line options like --option=value, --some-flag, or -x
|
# command-line options like --option=value, --some-flag, or -x
|
||||||
|
- match: '^[ ]{7}(-)(?=\s)'
|
||||||
|
captures:
|
||||||
|
1: entity.name.command-line-option.man
|
||||||
- match: '^[ ]{7}(?=-|\+)'
|
- match: '^[ ]{7}(?=-|\+)'
|
||||||
push: expect-command-line-option
|
push: expect-command-line-option
|
||||||
- match: '(?:[^a-zA-Z0-9_-]|^|\s){{command_line_option}}'
|
- match: '(?:[^a-zA-Z0-9_-]|^|\s){{command_line_option}}'
|
||||||
|
6
assets/syntaxes/02_Extra/syntax_test_man.man
vendored
6
assets/syntaxes/02_Extra/syntax_test_man.man
vendored
@ -131,6 +131,12 @@ OPTIONS
|
|||||||
# ^^ - variable
|
# ^^ - variable
|
||||||
output NUM (default 3) lines of copied context
|
output NUM (default 3) lines of copied context
|
||||||
|
|
||||||
|
- This is not really a switch, but indicates that standard input
|
||||||
|
# ^ entity.name.command-line-option.man
|
||||||
|
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - entity - variable
|
||||||
|
is coming from a file or a pipe and not interactively from the
|
||||||
|
command line.
|
||||||
|
|
||||||
EXAMPLE
|
EXAMPLE
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
# ^^^^^^^^ source.c meta.preprocessor.include keyword.control.import.include
|
# ^^^^^^^^ source.c meta.preprocessor.include keyword.control.import.include
|
||||||
|
Loading…
x
Reference in New Issue
Block a user