Conversation
|
Accessing I'm not fluent in Rust, so could you describe briefly your implementation strategy for |
|
Also, our current Rust port is outdated. Do you want to replace it? |
Yes. Although you last case caught a bug (just fixed it).
The problem of matching a pattern to an argv is similar to an already known problem: regular expression matching. So I just wrote a pretty naive backtracking matcher. A repeating argument consumes as little as possible for the entire pattern to match. You can see the code that handles a repeating pattern. Think of |
Sure! But I do have some ideas on how best to expose a convenient API. Could you check out the macro ideas section in my README and make sure you're OK with that? (The library will still have a regular dictionary-like API---as it does now---but I don't intend for it to be the common use case. Still kind of thinking about it.) |
|
This change will be introduced eventually, but not now. |
I'm not 100% sure that all my changes are correct (especially the first few to
"user-error", but I couldn't find anything in the Docopt README that said names can be accessed via prefix).Would you be open to adding tests that require more sophisticated pattern matching? e.g.,
cp FILE... DIR. I have it working in my Rust port along with all tests passing.