-
Notifications
You must be signed in to change notification settings - Fork 408
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
Use recipes for bash shell completions. #685
Conversation
Use just --list command to get the available recipes and use that to complete the command.
Thank you for this! |
I don't have rust environment or zsh for running tests. |
Glad you like it, and no worries! The reason the tests are failing is a bit convoluted. The completion scripts are generated automatically using clap, an command line argument parser. But, the generated scripts don't include the ability to complete recipes, since clap only knows about flags and options. So, I wrote a rust program that makes modifications to the completion scripts to include recipe completion. The test that's failing checks that the generated completion script is the same as what's checked in, which is why it's failing. I'm happy to merge the changes in to the script, I should be able to do it tomorrow. |
Use just --list command to get the available recipes and use that to complete the command.
4c4beea
to
9a90b69
Compare
I modified the script, so the tests should pass now. (You can ignore the error, it's spurious.) However, there's a problem, with the modifications, the bash completion script won't complete flags and options, so for example, the following don't work:
|
@casey , I have now modified the the subcommand.rs file to replace a bigger portion. |
Awesome, merged! Thank you very much for the pull request! |
Use just --list command to get the available recipes and use that to complete the command.