Skip to content

[Feature Request] Option dependencies #295

@jusw85

Description

@jusw85

Would be nice to specify option dependencies i.e. if an option is present, another option must also be present.

Reference example ('requires' flag):
https://github.com/kbknapp/clap-rs/blob/master/examples/07_option_args.rs
https://docs.rs/clap/2.31.1/clap/struct.Arg.html#method.requires

Usage example:

# ./pointorline --start=5,5 # start can exist by itself
# ./pointorline --end=10,10 # end cannot exist without start, error!

Right now it's possible to check this after parsing is done, so it's not a pressing issue, but it would be nice to have.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions