aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-11 19:28:32 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-11 19:28:32 +0200
commit9cbd5b4ee113c660377ffe9c01ca374d6addfef4 (patch)
tree8720b18cba789d27f28b3ce024f7caa90e93ccc7 /commands
parent30e38aab0849d28eaea11c5e1f9f9423a0999e0d (diff)
downloadgit-bug-9cbd5b4ee113c660377ffe9c01ca374d6addfef4.tar.gz
termui: allow to change the bug query
Diffstat (limited to 'commands')
-rw-r--r--commands/root.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/commands/root.go b/commands/root.go
index 77d0fcef..83722781 100644
--- a/commands/root.go
+++ b/commands/root.go
@@ -24,7 +24,9 @@ var RootCmd = &cobra.Command{
It use the same internal storage so it doesn't pollute your project. As you would do with commits and branches, you can push your bugs to the same git remote your are already using to collaborate with other peoples.`,
- // Force the execution of the PreRun while still displaying the help
+ // For the root command, force the execution of the PreRun
+ // even if we just display the help. This is to make sure that we check
+ // the repository and give the user early feedback.
Run: func(cmd *cobra.Command, args []string) {
cmd.Help()
},
@@ -35,6 +37,8 @@ It use the same internal storage so it doesn't pollute your project. As you woul
DisableAutoGenTag: true,
+ // Custom bash code to connect the git completion for "git bug" to the
+ // git-bug completion for "git-bug"
BashCompletionFunction: `
_git_bug() {
__start_git-bug "$@"