j-maly / CommandLineParser

Command line parser. Declarative arguments support. Rich set of argument types (switches, enums, files, etc...). Mutually exclusive arguments validations.
MIT License
137 stars 30 forks source link

Combination of arguments #52

Closed askids closed 6 years ago

askids commented 6 years ago

This could be an enhancement. There can be cases where combination of arguments have to be looked at to get full list of arguments for the application and treat them as valid input.

For example, let's say the app can accept 5 arguments. For simplicity, lets say its a,b,c,d,e. So there could be cases, where 1) if a is provided, then b should not be provided. 2) if c is provided, then a and d are also required.

All this, though might look like application specific logic, many users will have similar need. Though it might not be possible to cover all such kind of rules, but some of these basic ones could be added as part of default support.

BTW, thanks for this great utility library.

j-maly commented 6 years ago

Hi, please check out https://github.com/j-maly/CommandLineParser/wiki/Combinations-of-arguments It might cover your use cases.

askids commented 6 years ago

Seems to be what I am looking for. Let me give it a try. Thank you!