Port print arguments -q/-a/-S from main to restructuring.

This commit is contained in:
Oleksandr Kozachuk
2023-09-09 15:38:40 +02:00
parent 7cf62c54ef
commit d22877a0f1
2 changed files with 13 additions and 3 deletions
+4 -2
View File
@@ -113,8 +113,10 @@ def create_parser() -> argparse.ArgumentParser:
aliases=['p'])
print_cmd_parser.set_defaults(func=print_cmd)
print_cmd_parser.add_argument('-f', '--file', help='File to print', required=True)
print_cmd_parser.add_argument('-S', '--source-code-only', help='Print source code only (from the answer, if available)',
action='store_true')
print_cmd_modes = print_cmd_parser.add_mutually_exclusive_group()
print_cmd_modes.add_argument('-q', '--question', help='Print only question', action='store_true')
print_cmd_modes.add_argument('-a', '--answer', help='Print only answer', action='store_true')
print_cmd_modes.add_argument('-S', '--only-source-code', help='Print only source code', action='store_true')
argcomplete.autocomplete(parser)
return parser