Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#255·kong

Xor is ignored with positional arguments

Author: mitarCreated Dec 22, 2021Updated Sep 19, 2025
Labelsenhancementhelp wanted

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.

Source: alecthomas/kong

View original on GitHubView discussion on GitHub