glossary cmd / main: added --print option
This commit is contained in:
parent
6a77ec1d3b
commit
f17e76203a
@ -88,6 +88,8 @@ def glossary_cmd(args: argparse.Namespace, config: Config) -> None:
|
||||
create_glossary(args, config)
|
||||
elif args.list:
|
||||
list_glossaries(args, config)
|
||||
elif args.print:
|
||||
print_glossary(args, config)
|
||||
except GlossaryCmdError as err:
|
||||
print(f"Error: {err}")
|
||||
sys.exit(1)
|
||||
|
||||
@ -167,6 +167,7 @@ def create_parser() -> argparse.ArgumentParser:
|
||||
glossary_cmd_parser.add_argument('-f', '--file', help='File path of the goven glossary', metavar='GLOSSARY_FILE')
|
||||
glossary_cmd_parser.add_argument('-D', '--description', help="Glossary description", metavar="DESCRIPTION")
|
||||
glossary_group.add_argument('-i', '--list', help='List existing glossaries', action='store_true')
|
||||
glossary_group.add_argument('-p', '--print', help='Print an existing glossary', action='store_true')
|
||||
|
||||
argcomplete.autocomplete(parser)
|
||||
return parser
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user