update regex to parse multiple subcommands

This commit is contained in:
onyx-and-iris 2026-02-27 16:50:48 +00:00
parent a945fccda9
commit 214116bf97

View File

@ -15,7 +15,7 @@ class CustomHelpFormatter(DefaultFormatter):
"""Render the usage line with index argument injected."""
if usage:
modified_usage = re.sub(
r'(\S+\s+strip)\s+(COMMAND)', r'\1 <index> \2', str(usage)
r'(\S+\s+[a-z]+)\s+(COMMAND)', r'\1 <index> \2', str(usage)
)
console.print(f'[bold]Usage:[/bold] {modified_usage}')