aboutsummaryrefslogtreecommitdiffstats
path: root/commands/new.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-16 15:21:21 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-16 15:21:21 +0200
commitd3893a5e04868fb99df28c8da62a0ee59d7e9064 (patch)
tree0f702ca72b82cd2429c4451f77baf99156525852 /commands/new.go
parent9423e7fdb6f70afb37f567d86a97594b06d43eb1 (diff)
downloadgit-bug-d3893a5e04868fb99df28c8da62a0ee59d7e9064.tar.gz
rework the commands thing and add a "commands" command to list all commands
Diffstat (limited to 'commands/new.go')
-rw-r--r--commands/new.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/commands/new.go b/commands/new.go
index 2db95291..a2373515 100644
--- a/commands/new.go
+++ b/commands/new.go
@@ -3,7 +3,6 @@ package commands
import (
"errors"
"flag"
- "fmt"
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/bug/operations"
"github.com/MichaelMure/git-bug/commands/input"
@@ -66,9 +65,8 @@ func runNewBug(repo repository.Repo, args []string) error {
}
var newCmd = &Command{
- Usage: func(arg0 string) {
- fmt.Printf("Usage: %s new <title> [<option>...]\n\nOptions:\n", arg0)
- newFlagSet.PrintDefaults()
- },
- RunMethod: runNewBug,
+ Description: "Create a new bug",
+ Usage: "[<option>...] <title>",
+ flagSet: newFlagSet,
+ RunMethod: runNewBug,
}