More consistent scoping in commands section in Manpages

This commit is contained in:
Keith Hall
2023-02-10 06:12:04 +02:00
committed by Martin Nordholts
parent 2ac584dd72
commit 5e77ca37e8
3 changed files with 98 additions and 48 deletions

View File

@ -185,15 +185,16 @@ contexts:
push: command-line-option-or-pipe
commands-start:
- match: '^[ ]{7}(?=.*(?:[ ]<|[|]))'
- match: (?=^[ ]{7}.*(?:[ ]<|[|]))
push: commands
commands:
- match: '[-\w]+'
scope: entity.name.command.man
- match: '^[ ]{7}([a-z_\-]+)(?=[ ]|$)'
captures:
1: entity.name.command.man
push: expect-parameter
- match: '^[ ]{7}(?=[\[<]|\w+[|\]])'
push: expect-parameter
- match: $
pop: true
environment-variables:
- match: '^[ ]{7}([A-Z_]+)\b'