git-bug/misc/gen_bash_completion.go

25 lines
358 B
Go
Raw Normal View History

2018-08-06 04:22:36 +03:00
// +build ignore
package main
import (
"fmt"
"log"
"os"
"path"
2019-02-23 15:02:18 +03:00
"github.com/MichaelMure/git-bug/commands"
2018-08-06 04:22:36 +03:00
)
func main() {
cwd, _ := os.Getwd()
2019-02-23 15:02:18 +03:00
dir := path.Join(cwd, "misc", "bash_completion", "git-bug")
2018-08-06 04:22:36 +03:00
fmt.Println("Generating Bash completion file ...")
2018-08-06 04:22:36 +03:00
2019-02-23 15:02:18 +03:00
err := commands.RootCmd.GenBashCompletionFile(dir)
2018-08-06 04:22:36 +03:00
if err != nil {
log.Fatal(err)
}
}