From 75b75a1d5577ab74cfaef21b8736234b7b076925 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 4 Sep 2023 13:26:07 -0700 Subject: [PATCH] Show command name in header of help text. --- voussoirkit/betterhelp.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/voussoirkit/betterhelp.py b/voussoirkit/betterhelp.py index f764cb4..2a6a5a3 100644 --- a/voussoirkit/betterhelp.py +++ b/voussoirkit/betterhelp.py @@ -518,8 +518,13 @@ def make_helptext( # PUT IT ALL TOGETHER + if command_name is None: + header_name = program_name + else: + header_name = f'{program_name} {command_name}' + parts = [ - niceprints.equals_header(program_name) if do_headline else None, + niceprints.equals_header(header_name) if do_headline else None, program_description, main_invocation, '\n\n'.join(argument_helps),