-
-
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
feat(completions): Dynamic fish completions #5048
Conversation
@epage is there any e2e tests for dynamic completions yet? I only found them for the "legacy" completions, bash dynamic completions only asserts the generated completion script AFAICT: clap/clap_complete/tests/testsuite/bash.rs Lines 99 to 115 in 74109e5
And the tests for I'd extend the utilities in |
aabe822
to
79fab94
Compare
a087baa
to
6cc45d2
Compare
6cc45d2
to
26055b6
Compare
I joined the example into one file, though some of the workarounds feel a bit hacky. One thing is, that when the To not conflict with the non dynamic build, the dynamic binary needs to be compiled in a different folder. |
eed4ac5
to
78b079e
Compare
I also had to rename |
My PR has been merged |
78b079e
to
2b58b83
Compare
Not sure about the sorting to make |
19f1b2b
to
e3babb0
Compare
Or we could query the shell to handle this for us, and we'd only do filtering afterwards, i.e. |
Is there a place to document degradations? I.e. ways the dynamic completions worsen user experience compared to static completions. For fish taht would currently be:
|
Can you remove it from this PR? This is focused on fish support and as we've both seen, there seem to be complications with bash testing.
I'd recommend creating issues for these so we can discuss and resolve them independently
The tracking issue. |
d8ca556
to
2b58b83
Compare
2b58b83
to
4f9cf6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
btw I rewrote the PR description to not close #3917 since it looked like you were treating that as a mini-tracking issue. I leave it to you on whether you actually want to close that (and use the main tracking issue) or keep it open after this is merged |
I think it makes sense to collect the shell specific things in the fish issue, though the generic things such as the option filtering or help displaying should probably also be added to the main tracking issue. |
Thanks for your patience through all of the back and forth in getting this in! |
Supersedes #4177.
Part of #3917.