From a0590195f6758e4670427ca4ce39efbd2c6c9b76 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Sat, 8 May 2021 09:54:57 +0200 Subject: 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. --- quarg/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- cgit v1.2.3-2-gb3c3