diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-08-22 16:19:15 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2025-08-29 15:54:42 -0600 |
commit | a2d58c917c3e0d0cd161e343261717dbe96ffe22 (patch) | |
tree | cde228290ee0e8d38e15c55156616cdd44275d67 /tools/docs/lib/parse_data_structs.py | |
parent | 8a5a85be4df1ab0642d4a3610691dbaed443d4d0 (diff) |
docs: parse-headers.py: improve --help logic
When printing --help, we'd like the name of the files
from __doc__ to match the displayed positional arguments at
both usage and argument description lines.
Use a custom formatter class to convert ``foo`` into ANSI SGR
code to bold the argument, if is TTY, and adjust the help
text to match the argument names.
Here on Plasma, that makes it display it colored, wich is
really cool. Yet, I opted for SGR, as the best is to follow
the terminal color schema for bold.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/2c1e61d1fb1b2a2838b443beee89c1528831997f.1755872208.git.mchehab+huawei@kernel.org
Diffstat (limited to 'tools/docs/lib/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions