1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-09 01:05:53 +02:00

make parser_shortname more robust

This commit is contained in:
Kelly Brazil
2024-01-09 07:53:28 -08:00
parent 03b70eebb7
commit 2cd58d75e7

View File

@ -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"""