Skip to content

Support repeating composite arguments (was: Parameter options/modifiers) #358

@kravemir

Description

@kravemir

Picocli supports mixing options and parameters: http://picocli.info/#_mixing_options_and_positional_parameters

I would like to know what options have been specified before certain parameter. Consider such command:

print --paper A4 A.pdf --count 3 B.pdf --rotate left C.pdf -- D.pdf --rotate right E.pdf

Where:

  • --paper is an global option,
  • --count and --rotate are "local" options, or parameter modifiers,
  • -- reset local options.

So, that command would evaluate to:

  • globals: paper = A4,
  • parameter A.pdf: count = default, rotate = default,
  • parameter B.pdf: count = 3, rotate = default,
  • parameter C.pdf: count = 3, rotate = left,
  • parameter D.pdf: count = default, rotate = default,
  • parameter E.pdf: count = default, rotate = right.

Is there support for such things in picocli?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions