-
Notifications
You must be signed in to change notification settings - Fork 15
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
Auto completion for dynamic scripts including possible arguments #23
Comments
Cobra support this pretty easily already. The project has some documentation on how to do it based of how https://github.com/spf13/cobra/blob/master/bash_completions.md Basically what we need to do is to write some bash script that uses Maybe if we make the Some seudo code for the approach:
|
First stop to fix #23 Missing completion on arguments but we must modify the ls command to expose this information to make the implementation sane here.
With #14 implemented we can extend it with the option to define a template to |
Control the output of 'shuttle run test --help' with --template. $ shuttle run test --help --template '{{.Description}}' Run shuttle test suite for both Go and bash source code. Part of solving #23
First stop to fix #23 Missing completion on arguments but we must modify the ls command to expose this information to make the implementation sane here.
Bash custom completions for the run command. When cobra fails to find completions for the run command the bash function '__shuttle_custom_func' is called. The function looks up available scripts to run through shuttle it self (shuttle ls) and available arguments for the chosen script (shuttle run script --help). zsh completion is handled by wrapping the bash completions. This is copied by the way kubectl handles this. Closes #23.
Auto completion for dynamic scripts and arguments would enhance the experience using
shuttle
The text was updated successfully, but these errors were encountered: