adishavit / argh

Argh! A minimalist argument handler.
BSD 3-Clause "New" or "Revised" License
1.33k stars 93 forks source link

The best way to check for unrecognised param to show help message? #53

Closed ivan-volnov closed 4 years ago

ivan-volnov commented 4 years ago

Subj.

Thanks!

adishavit commented 4 years ago

Argh parses whatever arguments are provided. It’s up to the user to decide what they mean and how they are used. It is not designed to a-priori limit the acceptable values. One way you may achieve what you want is to (externally) iterate over all the given flags and parameters and check if they belong to your user defined “known” set. If not issue your help message.

ivan-volnov commented 4 years ago

Thanks.