alecthomas/kong

Xor is ignored with positional arguments

Open

#255 opened on Dec 22, 2021

View on GitHub
 (5 comments) (1 reaction) (0 assignees)Go (3,067 stars) (164 forks)user submission
enhancementhelp wanted

Description

I would like to do something like:

run --defaults

or:

run foo bar

but prevent:

run --defaults foo bar

It seems xor for positional arguments (flag with arg:"") does not do anything: there is no error if both are provided.

Contributor guide