Add bash autocompletion generator

Given a (potentially annotated) cobra command you can generate a bash
completion script.
This commit is contained in:
Eric Paris
2015-03-16 15:31:03 -04:00
parent f576d29563
commit 9b2e6822e5
5 changed files with 557 additions and 0 deletions

View File

@ -348,6 +348,9 @@ Like help the function and template are over ridable through public methods.
command.SetUsageTemplate(s string)
## Generating bash completions for your command
Cobra can generate a bash completions file. If you add more information to your command these completions can be amazingly powerful and flexible. Read more about [Bash Completions](bash_completions.md)
## Debugging