vietjtnguyen / argagg

A simple C++11 command line argument parser
MIT License
223 stars 27 forks source link

Allow `-long_name` #17

Open apavlenko opened 6 years ago

apavlenko commented 6 years ago

Is it possible to allow long names with a single dash? e.g. -log=errors-only obviously, short opt-s grouping should be disabled in this case

vietjtnguyen commented 6 years ago

Would the idea be that you can configure the parser just prior to parsing to either parse for short option groups or ignore short option groups and treat multi-character options as long options?

apavlenko commented 6 years ago

yes, this is exactly what I mean: the approach of grouping short options is popular but an alternative practice of using long options with a single dash is also popular enough. so I would recommend a flag in c-tor disabling grouping and allowing -l, -log and --log to be the same option.

ajonnet commented 6 years ago

XCode puts some default arguments, which breaks the argument parser "-NSDocumentRevisionsDebugMode"

Either a option to filter them or some sort of compatibility mode would be helpfull

vietjtnguyen commented 5 years ago

Merging with #23.

vietjtnguyen commented 5 years ago

Actually reopening this after https://github.com/vietjtnguyen/argagg/issues/23#issuecomment-458465334