aboutsummaryrefslogtreecommitdiffstats
path: root/misc/gen_powershell_completion.go
diff options
context:
space:
mode:
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)
+ }
+}