-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support allow_hyphen_values
in native completions
#5628
Conversation
@shannmu would be interested in you looking over this as well, both from your experience with this code and for where you were planning on taking this code. |
Sorry for the late reply, I will look over the code. |
Thank you very much for your attention to this issue! clap/clap_complete/src/dynamic/complete.rs Lines 58 to 131 in e318821
This code is primarily used to match patterns in the arg string itself, such as --, --flag, -f, and value. These different patterns go into different branches. Adding an if allow_hyphen branch in there, I believe, would disrupt the logic of this code. I think we could try matching the state in other branches, similar to how it's done in the else branch.
Of course, the logic for allow_hyphen_values should be similar across these branches, so perhaps the code can be reused. |
As mentioned above, we need to add some logic in each branch. If the result of No need to worry about the code getting bloated; if it does, that just means it’s time for a refactor. |
I've been trying to do some clean up to make it easier for people to be contributing to this code. Things should be calmed down for resolving conflicts. |
I'm a bit unsure what I should change in the |
I seem to have misunderstood; updating |
Could you clean up your commits so they are presented for easy understanding of what you are trying to accomplish and without any merge commits? |
b5eb03b
to
b111717
Compare
91dee7a
to
f9264da
Compare
f9264da
to
57b6cb8
Compare
Thanks! |
Resolves #5594