diff options
author | Wolfgang Müller | 2021-05-08 09:54:57 +0200 |
---|---|---|
committer | Wolfgang Müller | 2021-05-08 09:54:57 +0200 |
commit | a0590195f6758e4670427ca4ce39efbd2c6c9b76 (patch) | |
tree | 9e86d6354e3b73649c9f413c2bcf842e921feafc | |
parent | 43c9fb13e063cebfd08e741b67b9ec2317aed4b9 (diff) | |
download | quarg-a0590195f6758e4670427ca4ce39efbd2c6c9b76.tar.gz |
main: Allow intermixing optional with positional arguments
argparse's parse_args() does not support intermixed arguments, making
the following invocation of quarg error out:
$ quarg -b foo hello -t privmsg world
quarg: error: unrecognized arguments: world
This can be very confusing to the user, so allow intermixing arguments
by using the parse_intermixed_args() method instead.
-rw-r--r-- | quarg/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/quarg/main.py b/quarg/main.py index 36e6f92..5ba6e3d 100644 --- a/quarg/main.py +++ b/quarg/main.py @@ -120,7 +120,7 @@ def time_query(query): return rows, end - start def main(): - args = cli.parse_args() + args = cli.parse_intermixed_args() check_args(args) config = get_config() |