docopt.rs
docopt.rs copied to clipboard
No warning that "<path> | -" can never match the latter
trafficstars
It might be nice to warn that if you have a conditional, the catch-all should be at the end.
Mmhmm. Yeah, maybe. I probably won't budget time to work on this, so if someone else wants to submit a PR, that's fine. So long as it doesn't add any significant complexity to the implementation, I'd be happy to maintain it.
In fact, it'd have to be an error at compile time.
But perhaps this is actually a useful pattern - it acts as a form of hinting for possible 'magic' values of arg_path. I'll have a think about how I'd tweak the docs.