kotlin-argparser
kotlin-argparser copied to clipboard
Make it possible to emulate the `[<tree-ish>] [--] [<paths>...]` behavior of git-checkout
Part of git-checkout's usage looks like this:
git checkout [-p|--patch] [<tree-ish>] [--] [<paths>...]
The <tree-ish>
and <paths>
are both positional arguments. One can disambiguate between a
<tree-ish>
and a <paths>
argument by using --
.
It might be useful to be able to emulate this behavior.
Implementing this might be as simple as adding a flag to ArgParser.argumentList
(and argument
) that disables parsing of the positional argument once --
appears.