Skip to content

howto: simulate K V checked args list #1070

@leaveye

Description

@leaveye

i want to write a helper tool to edit configure on my target box.

suppose we have config-entries constants:

# `key1` accept only `value1` and `value2`
key1: value1 value2
key2: foo bar baz

is there a way to let my tool command line like:

set-helper key1 value1 key2 refused

and with param validation works with both key and values?


i have imagined a way that takes vector<string> arg and do check in a sort-of-callback. but seems not fit the CLI11 design principle. any suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions