vietjtnguyen / argagg

A simple C++11 command line argument parser
MIT License
224 stars 28 forks source link

Support for sinks of unparsed arguments #24

Open Manu343726 opened 5 years ago

Manu343726 commented 5 years ago

I would like to have a way to tell argagg to forward unknown arguments to a generic sink, so that unrecognized arguments can be processed by other means. Similar to LLVM's Sink which tells the parser that an option eats all unrecognized args.

Manu343726 commented 5 years ago

After studying a bit your code I would say this is could be implemented by a config in the parser (parser.ignore_unknown_args() or something like that) and register all unknown flags in an internal buffer of the arguments map instead of throwing an exception.