1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-02 03:12:25 +01:00

Fix for OPTIONS consisting of a plain dash

This commit is contained in:
Keith Hall
2024-12-30 21:07:49 +02:00
committed by Keith Hall
parent caba54efc9
commit b7b05a3553
2 changed files with 9 additions and 0 deletions

View File

@@ -85,6 +85,9 @@ contexts:
options:
# command-line options like --option=value, --some-flag, or -x
- match: '^[ ]{7}(-)(?=\s)'
captures:
1: entity.name.command-line-option.man
- match: '^[ ]{7}(?=-|\+)'
push: expect-command-line-option
- match: '(?:[^a-zA-Z0-9_-]|^|\s){{command_line_option}}'