From 35240350eab9525d63361915c30d467edc108d57 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Fri, 20 Jul 2018 16:08:55 +0200 Subject: generate zsh completion --- doc/gen_zsh_completion.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 doc/gen_zsh_completion.go (limited to 'doc/gen_zsh_completion.go') diff --git a/doc/gen_zsh_completion.go b/doc/gen_zsh_completion.go new file mode 100644 index 00000000..319805fd --- /dev/null +++ b/doc/gen_zsh_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", "zsh_completion", "git-bug") + + fmt.Println("Generating zsh completion file ...") + + err := commands.RootCmd.GenZshCompletionFile(filepath) + if err != nil { + log.Fatal(err) + } +} -- cgit