Hejsil / zig-clap

Command line argument parsing library
MIT License
939 stars 67 forks source link

feat: Add `terminating_positional` to `clap.ParseOptions` #137

Closed Hejsil closed 1 week ago

Hejsil commented 1 week ago

This option makes clap.parse and clap.parseEx stop parsing after encountering a certain positional index. Setting terminating_positional to 0 will make them stop parsing after the 0th positional has been added to positionals (aka after parsing 1 positional)

This is a revival of https://github.com/Hejsil/zig-clap/pull/93 and is also a step towards subcommands (https://github.com/Hejsil/zig-clap/issues/90)