Consider all arguments after "--" free arguments
dutt opened this issue · 3 comments
dutt commented
I recently rewrote the argument parsing for cargo-cupply-chain and one thing I had to work around was the forwarding of arguments. In this case everything after "--" isn't matched by the program itself but forwarded to another program, which worked fine for e.g. "-- foo bar" but it rejected "-- foo --bar" because it was an unused argument.
Ideally everything after " -- " should be considered a free argument.
Example:
"/bin/foo --bar --moo=5 -- --lurg" would match bar and moo, but lurg would be among the free arguments.
RazrFalcon commented
dutt commented
Ah, fair enough.
RazrFalcon commented
Bu the way, this is how you suppose to handle --
.