airlift / airline

Java annotation-based framework for parsing Git like command line structures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support named positional arguments

electrum opened this issue · comments

There should be a way to specify that exactly two arguments are required:

git remote add <name> <url>

Currently, this must be done as List<String>, which requires the user code to do the min/max checking, and doesn't allowing mixed types, such as String and URI.

Any suggestions on how to implement this?

we could add something like:

  @Arguments
  void setArguments(String name, URI uri) {
    ...
  }

We can extract the names using paranamer (or the Java 8 apis).