diff options
author | Michael Muré <batolettre@gmail.com> | 2018-07-20 15:48:18 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-07-20 15:48:18 +0200 |
commit | e527c57fdd3931127e31a434e55c1dac16eb20b4 (patch) | |
tree | e56169625189391b04bdfb139b74545623330752 /doc/gen_bash_completion.go | |
parent | 5a8c6498bb289ce7859fc17803a5a54bc22646c6 (diff) | |
download | git-bug-e527c57fdd3931127e31a434e55c1dac16eb20b4.tar.gz |
add bash completion (only for "git-bug" for now ...)
Diffstat (limited to 'doc/gen_bash_completion.go')
-rw-r--r-- | doc/gen_bash_completion.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/gen_bash_completion.go b/doc/gen_bash_completion.go new file mode 100644 index 00000000..df662a6c --- /dev/null +++ b/doc/gen_bash_completion.go @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/MichaelMure/git-bug/commands" + "log" + "os" + "path" +) + +func main() { + cwd, _ := os.Getwd() + filepath := path.Join(cwd, "doc", "bash_completion", "git-bug") + + fmt.Println("Generating bash completion file ...") + + err := commands.RootCmd.GenBashCompletionFile(filepath) + if err != nil { + log.Fatal(err) + } +} |