From 7a24e4e5526163f1c90b3bd5be173c545bd283cb Mon Sep 17 00:00:00 2001 From: Alex Schofield Date: Wed, 19 Feb 2025 02:21:15 +0000 Subject: add shorthand options for choices in CLI --- cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli.py b/cli.py index db9821b..12fd40a 100644 --- a/cli.py +++ b/cli.py @@ -19,13 +19,13 @@ def main(): # The user can only choose one of these options or the program will exit # If not provided, the program will exit loc = parser.add_mutually_exclusive_group(required=True) - loc.add_argument("--local") - loc.add_argument("--s3") + loc.add_argument("-l", "--local") + loc.add_argument("-s", "--s3") # Require user to provide a list of PII fields to obfuscate # e.g. --pii name email_address # If not provided, the program will exit - parser.add_argument("--pii", nargs="+", required=True) + parser.add_argument("-p", "--pii", nargs="+", required=True) # Parse the arguments args = parser.parse_args() -- cgit v1.2.3