-
-
Notifications
You must be signed in to change notification settings - Fork 226
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: add shell completion generation #1775
Conversation
This is very cool, thank you for the contribution! I'll get back to you on Monday to work out the kinks. |
Another thing—did you intentionally move ETA: You will also need to fix the Other than that, this is ready to merge, I think. |
Ah, I turned on format-on-save before making that commit, that must have reordered those Do I need to write some docs for this also? Thanks for the help and patience (with my not knowing how a CLI actually works) |
I saw the Windows test failed, because they are also missing an update to the snapshot tests. So I tried to set up this repo on a Windows machine, but 2 other tests failed there on the main branch. And curiously, those tests didn't fail in CI, but only when running |
The errors happened because I used regular Windows cmd, when I used git bash, everything worked. |
Merged! Thank you very much for the contribution! |
This adds the ability to generate shell completions to the CLI.
While this PR is not in an ideal form yet, I'd be more than happy to work together to make it fit the used patterns in this repo.
I tried following them, but ran into trouble because the
execute
method for each command did not get aCommand
passed, which this shell completions generator needs.Here is an example of me using the completions this generates:
https://asciinema.org/a/dsXad2IayVyXJFHKX0GjvRhjH