Clic: Add non-terminal sequence of parameters

Context

This adds a sequence that doesn't have to be the last parameter. It is followed by suffix keywords and further parameters. On execution, the suffix will be attempted to be matched before the sequence's parameters. Because of this, care must be taken that the sequence's parameters cannot be interpreted as the suffix keywords. For example, it shouldn't be used with parameters that can be arbitrary strings such as aliases.

Opam tests https://gitlab.com/metastatedev/tezos/-/pipelines/187864190 ran on branch tomas/cli-non-terminal-seq-opam

Manually testing the MR

This MR doesn't make use the parameter, but one can implement a new command with it to try it. A command that uses nonTerminalSeq is implemented in !2084 (merged).

Checklist

  • Provide automatic testing (see the testing guide).
    • added clic unit tests for the parameter's auto-completion
    • integration tests for a command that uses nonTerminalSeq are included in !2084 (merged)
  • Add item in the Development Version section of CHANGES.md (only for new features and bug fixes).
    • not applicable
  • squash fixups before merging

Reviewers

@rafoo_

Edited by Tomáš Zemanovič

Merge request reports

Loading