zig-clap
zig-clap copied to clipboard
Handles rest arguments incorrectly?
I'm trying to implement mv in Zig, which means that the args I need to accept looks like this:
///<FILE>...
///<FILE>
Given mv a b c, this returns .{{a}, c}, rather than .{{a,b},c}. If I remove the second file, I get .{{a,b,c}}.
It feels incorrect, but perhaps the recommended approach to just do one FILE? If that's the case, would you accept a PR to document that?
Yea, this currently does not work and I'm not entirely sure how I would make it work with now clap parses positionals. A PR to document this limitation is welcome. Or, even better, make clap throw a compile error if anything but the last positional takes multiple values