kotlin-argparser icon indicating copy to clipboard operation
kotlin-argparser copied to clipboard

Make it possible to emulate the `[<tree-ish>] [--] [<paths>...]` behavior of git-checkout

Open xenomachina opened this issue 8 years ago • 0 comments

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.

xenomachina avatar Jan 09 '17 04:01 xenomachina