Skip to content

Improve positional arg handling in the CommandLine parser

Marios Hadjimichael requested to merge marios/extend-cli-parser into master

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • Metrics N/A
  • Documentation update(s)

If not required, please explain in brief why not.

Description

This PR improves the commandline parser's handling of positional arguments.

Changes proposed in this merge request:

  • Support for -- to explicitly specify positional args. (Makes it possible to pass a positional argument with the same name as in the spec, e.g. having --debug in the spec but wanting to pass it as a positional arg)
  • Support for Vector of strings for positional arguments.

Validation

Unit tests and integration tests. Existing behavior unchanged.

Issues addressed

Makes it possible to use the parser effectively for https://gitlab.com/BuildGrid/trexe/

Edited by Marios Hadjimichael

Merge request reports