Make -s
and -p
mutually exclusive
This commit is contained in:
parent
3ab5be69a1
commit
50292eb2cb
|
@ -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`)",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user