Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage help parameter list details should indicate arity for positional parameters #198

Closed
remkop opened this issue Oct 4, 2017 · 0 comments

Comments

@remkop
Copy link
Owner

remkop commented Oct 4, 2017

E.g.

class App {
    @Parameters(arity = "2", split = "\\|", type = {Integer.class, String.class},
            paramLabel = "FIXTAG=VALUE",
            description = "Exactly two lists of vertical bar '|'-separated FIXTAG=VALUE pairs.")
    Map<Integer,String> message;

    @Option(names = {"-P", "-map"}, split = ",", type = {TimeUnit.class, String.class},
            paramLabel = "TIMEUNIT=VALUE",
            description = "Any number of TIMEUNIT=VALUE pairs. These may be specified separately (-PTIMEUNIT=VALUE) or as a comma-separated list.")
    Map<TimeUnit, String> map;
}

Should show

Usage: <main class> [-P=TIMEUNIT=VALUE[,TIMEUNIT=VALUE]...]... FIXTAG=VALUE
                    [\|FIXTAG=VALUE]... FIXTAG=VALUE[\|FIXTAG=VALUE]...
      FIXTAG=VALUE[\|FIXTAG=VALUE]... FIXTAG=VALUE[\|FIXTAG=VALUE]...
                              Exactly two lists of vertical bar '|'-separated
                                FIXTAG=VALUE pairs.
  -P, -map=TIMEUNIT=VALUE[,TIMEUNIT=VALUE]...
                              Any number of TIMEUNIT=VALUE pairs. These may be
                                specified separately (-PTIMEUNIT=VALUE) or as a
                                comma-separated list.

Currently shows

Usage: <main class> [-P=TIMEUNIT=VALUE[,TIMEUNIT=VALUE]...]... FIXTAG=VALUE
                    [\|FIXTAG=VALUE]... FIXTAG=VALUE[\|FIXTAG=VALUE]...
      FIXTAG=VALUE            Exactly two lists of vertical bar '|'-separated
                                FIXTAG=VALUE pairs.
  -P, -map=TIMEUNIT=VALUE[,TIMEUNIT=VALUE]...
                              Any number of TIMEUNIT=VALUE pairs. These may be
                                specified separately (-PTIMEUNIT=VALUE) or as a
                                comma-separated list.
@remkop remkop added this to the 2.0.0 milestone Oct 4, 2017
@remkop remkop closed this as completed in b67a175 Oct 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant