-
-
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
fix: Resolve conflicting name inference if from aliases #5025
Conversation
Did you verify there are tests for the two other infer cases? |
Yeah: conflict test, simple, and exact. |
To be more precise, in #5021, I asked for a fix to the issue to also verify that longs and subcommand longs have tests to verify they don't conflict with their aliases when doing inferring. |
What do you mean by "longs and subcommand longs"? If longs means |
So now the PR description links to that, saying so.
clap supports subcommands to be flags, so you can use either |
I had no idea that was a thing, thanks. Where is it documented? |
Thanks, seems to all work! |
Sorry for completely dropping the ball on this, had to prioritize some other stuff. My nonsense tests should be fixed and long_flag inference actually works now. |
Thanks for the follow up! As a nit, would you be ok moving all tests to a single commit at the start of the PR, making them pass on their own, and then have the 2 fix commits on top that update the test to pass again with their change? This will help show that (1) the test is testing the right thing and (2) this does fix the issue. |
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
Lol yeah I've even written about this before, done. |
Thanks for your patience through this whole series and for getting this implemented! |
Awesome, thanks! |
4.4.5 is now out |
This fixes 3 behaviors with inferring subcommands
Testing of long flags was covered in #4971
Fixes #5021