From e527c57fdd3931127e31a434e55c1dac16eb20b4 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Fri, 20 Jul 2018 15:48:18 +0200 Subject: add bash completion (only for "git-bug" for now ...) --- doc/gen_bash_completion.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 doc/gen_bash_completion.go (limited to 'doc/gen_bash_completion.go') 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) + } +} -- cgit