aboutsummaryrefslogtreecommitdiffstats
path: root/misc/gen_powershell_completion.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-06-23 14:31:27 +0200
committerMichael Muré <batolettre@gmail.com>2019-06-23 14:33:02 +0200
commitb64587f87abdca0bb15120bf3da48eedd812ca6b (patch)
tree0846697446f1a75a170c8cef749b35992a40bde5 /misc/gen_powershell_completion.go
parent7461c1fe3a9ea404e38dd05182400d5739793d11 (diff)
downloadgit-bug-b64587f87abdca0bb15120bf3da48eedd812ca6b.tar.gz
misc: generate PowerShell command completion
Diffstat (limited to 'misc/gen_powershell_completion.go')
-rw-r--r--misc/gen_powershell_completion.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/misc/gen_powershell_completion.go b/misc/gen_powershell_completion.go
new file mode 100644
index 00000000..c2766399
--- /dev/null
+++ b/misc/gen_powershell_completion.go
@@ -0,0 +1,24 @@
+// +build ignore
+
+package main
+
+import (
+ "fmt"
+ "log"
+ "os"
+ "path"
+
+ "github.com/MichaelMure/git-bug/commands"
+)
+
+func main() {
+ cwd, _ := os.Getwd()
+ filepath := path.Join(cwd, "misc", "powershell_completion", "git-bug")
+
+ fmt.Println("Generating PowerShell completion file ...")
+
+ err := commands.RootCmd.GenPowerShellCompletionFile(filepath)
+ if err != nil {
+ log.Fatal(err)
+ }
+}