apple / swift-argument-parser

Straightforward, type-safe argument parsing for Swift
Apache License 2.0
3.31k stars 311 forks source link

Document ability to ignore unknown options/flags #571

Closed Alkenso closed 10 months ago

Alkenso commented 1 year ago

Different versions of CLI tool may have full of partial set of supported flags and options. In some cases there is convenient to call such CLI tool with full set of parameters and the tool would parse known ones and ignore unknowns.

After many search attempts I've found that such behaviour may be achieved by using allUnrecognized strategy with @Argument attribute. But that is so not obvious! I'd like to propose document briefly behaviour in main readme