-
Notifications
You must be signed in to change notification settings - Fork 19
feat: implement autocomplete #238
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
Conversation
Signed-off-by: lallevato-lm <luke.d.allevato@lmco.com>
Co-authored-by: jhoward-lm <140011346+jhoward-lm@users.noreply.github.com> Signed-off-by: Luke Allevato <165693161+lallevato-lm@users.noreply.github.com>
Co-authored-by: jhoward-lm <140011346+jhoward-lm@users.noreply.github.com> Signed-off-by: Luke Allevato <165693161+lallevato-lm@users.noreply.github.com>
Co-authored-by: jhoward-lm <140011346+jhoward-lm@users.noreply.github.com> Signed-off-by: Luke Allevato <165693161+lallevato-lm@users.noreply.github.com>
Co-authored-by: jhoward-lm <140011346+jhoward-lm@users.noreply.github.com> Signed-off-by: Luke Allevato <165693161+lallevato-lm@users.noreply.github.com>
Signed-off-by: lallevato-lm <luke.d.allevato@lmco.com>
|
Edit: disregard, handled in #240 We should also add flag completions for flags like In the link PR branch, I've refactored flags like those that consist of a static set of choices, so keep that in mind. For the cobra.CheckErr(linkCmd.RegisterFlagCompletionFunc("type",
func(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
return typeChoice.choices, cobra.ShellCompDirectiveDefault
},
))where |
Signed-off-by: lallevato-lm <luke.d.allevato@lmco.com>
|
Just curious, what happens if you delete the database file before attempting to |
Signed-off-by: lallevato-lm <luke.d.allevato@lmco.com>
Signed-off-by: lallevato-lm <luke.d.allevato@lmco.com>
Signed-off-by: lallevato-lm <luke.d.allevato@lmco.com>
Signed-off-by: lallevato-lm <luke.d.allevato@lmco.com>
Had a couple ideas for a possible (and maybe only partial) solution using
If nothing in the second option works, I think the first is probably good enough for now |
Signed-off-by: lallevato-lm <luke.d.allevato@lmco.com>
jhoward-lm
left a comment
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.
Looks great, thanks!
Signed-off-by: lallevato-lm <luke.d.allevato@lmco.com>
Description
Adds a valid args autocomplete function to
bomctlfor cached document IDs and aliases. The script to enable this completion can be created withbomctl completion bash(or whatever your shell is).Fixes #66
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist