aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorWolfgang Müller2021-05-08 09:54:57 +0200
committerWolfgang Müller2021-05-08 09:54:57 +0200
commita0590195f6758e4670427ca4ce39efbd2c6c9b76 (patch)
tree9e86d6354e3b73649c9f413c2bcf842e921feafc
parent43c9fb13e063cebfd08e741b67b9ec2317aed4b9 (diff)
downloadquarg-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.py2
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()