aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gen_zsh_completion.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-20 16:08:55 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-20 16:08:55 +0200
commit35240350eab9525d63361915c30d467edc108d57 (patch)
tree6d94cdaca39bb5ef72b4e0247ad8f278cafc5030 /doc/gen_zsh_completion.go
parent302a69bfc5c1de153455a813ef14c170452305f0 (diff)
downloadgit-bug-35240350eab9525d63361915c30d467edc108d57.tar.gz
generate zsh completion
Diffstat (limited to 'doc/gen_zsh_completion.go')
-rw-r--r--doc/gen_zsh_completion.go21
1 files changed, 21 insertions, 0 deletions
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)
+ }
+}