From 2cd58d75e72ac2143c34e2133ba963b9541efa63 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Tue, 9 Jan 2024 07:53:28 -0800 Subject: [PATCH] make parser_shortname more robust --- jc/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jc/cli.py b/jc/cli.py index a5e7ff12..b1a40960 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -194,7 +194,8 @@ class JcCli(): @staticmethod def parser_shortname(parser_arg: str) -> str: """Return short name of the parser with dashes and no -- prefix""" - return parser_arg.lstrip('-') + p = parser_arg.lstrip('-') + return p.replace('_', '-') def parsers_text(self) -> str: """Return the argument and description information from each parser"""