aboutsummaryrefslogtreecommitdiffstats
path: root/misc/gen_completion.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-06-28 19:24:32 +0200
committerGitHub <noreply@github.com>2020-06-28 19:24:32 +0200
commit33d510ac3999b3d8fa7a4652dc44a21c713f97de (patch)
tree79ea46f76ac6f69c2e6cbf3323be7c620c39a510 /misc/gen_completion.go
parentc0dbc149d5c0c3610476ba14a800c9ba803a2c2c (diff)
parent536c290dfbe6e0741c56f33659563c528c9f09b1 (diff)
downloadgit-bug-33d510ac3999b3d8fa7a4652dc44a21c713f97de.tar.gz
Merge pull request #414 from MichaelMure/cmd-rework
commands: refactor to avoid globals
Diffstat (limited to 'misc/gen_completion.go')
-rw-r--r--misc/gen_completion.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/gen_completion.go b/misc/gen_completion.go
index 0ebb5eeb..80b89902 100644
--- a/misc/gen_completion.go
+++ b/misc/gen_completion.go
@@ -39,23 +39,23 @@ func main() {
func genBash() error {
cwd, _ := os.Getwd()
dir := path.Join(cwd, "misc", "bash_completion", "git-bug")
- return commands.RootCmd.GenBashCompletionFile(dir)
+ return commands.NewRootCommand().GenBashCompletionFile(dir)
}
func genFish() error {
cwd, _ := os.Getwd()
dir := path.Join(cwd, "misc", "fish_completion", "git-bug")
- return commands.RootCmd.GenFishCompletionFile(dir, true)
+ return commands.NewRootCommand().GenFishCompletionFile(dir, true)
}
func genPowerShell() error {
cwd, _ := os.Getwd()
filepath := path.Join(cwd, "misc", "powershell_completion", "git-bug")
- return commands.RootCmd.GenPowerShellCompletionFile(filepath)
+ return commands.NewRootCommand().GenPowerShellCompletionFile(filepath)
}
func genZsh() error {
cwd, _ := os.Getwd()
filepath := path.Join(cwd, "misc", "zsh_completion", "git-bug")
- return commands.RootCmd.GenZshCompletionFile(filepath)
+ return commands.NewRootCommand().GenZshCompletionFile(filepath)
}