Make -s and -p mutually exclusive

This commit is contained in:
Samuel Sloniker 2022-04-08 14:13:06 -07:00
parent 3ab5be69a1
commit 50292eb2cb

View File

@ -35,13 +35,14 @@ parser = argparse.ArgumentParser(
description="Securely run a script from the Internet" description="Securely run a script from the Internet"
) )
parser.add_argument("url", help="URL of the script") parser.add_argument("url", help="URL of the script")
parser.add_argument( group = parser.add_mutually_exclusive_group()
group.add_argument(
"-s", "-s",
"--skip-pager", "--skip-pager",
action="store_true", action="store_true",
help="Skip pager and confirmation; run script immediately", help="Skip pager and confirmation; run script immediately",
) )
parser.add_argument( group.add_argument(
"-p", "-p",
"--pager", "--pager",
help="Choose pager to use (default: `less`)", help="Choose pager to use (default: `less`)",