diff options
author | Michael Muré <batolettre@gmail.com> | 2018-07-31 16:43:43 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-07-31 16:44:23 +0200 |
commit | 87669e0f18f282854d340a676834b939e34e5ed3 (patch) | |
tree | c78eaa155d2939d6647ab814c6710d0d3ed69a6e /commands | |
parent | eb39c5c29bc0e9b5e15a940a1b71bdac688b6535 (diff) | |
download | git-bug-87669e0f18f282854d340a676834b939e34e5ed3.tar.gz |
termui: use the editor to create a new bug
Diffstat (limited to 'commands')
-rw-r--r-- | commands/comment.go | 2 | ||||
-rw-r--r-- | commands/new.go | 2 | ||||
-rw-r--r-- | commands/root.go | 1 |
3 files changed, 2 insertions, 3 deletions
diff --git a/commands/comment.go b/commands/comment.go index cebf729c..0a76e4ce 100644 --- a/commands/comment.go +++ b/commands/comment.go @@ -35,7 +35,7 @@ func runComment(cmd *cobra.Command, args []string) error { } if commentMessage == "" { - commentMessage, err = input.BugCommentEditorInput(repo, messageFilename) + commentMessage, err = input.BugCommentEditorInput(repo) if err == input.ErrEmptyMessage { fmt.Println("Empty message, aborting.") return nil diff --git a/commands/new.go b/commands/new.go index 88e7cd81..a13e36bf 100644 --- a/commands/new.go +++ b/commands/new.go @@ -25,7 +25,7 @@ func runNewBug(cmd *cobra.Command, args []string) error { } if newMessage == "" || newTitle == "" { - newTitle, newMessage, err = input.BugCreateEditorInput(repo, messageFilename, newTitle, newMessage) + newTitle, newMessage, err = input.BugCreateEditorInput(repo, newTitle, newMessage) if err == input.ErrEmptyTitle { fmt.Println("Empty title, aborting.") diff --git a/commands/root.go b/commands/root.go index 54368fc7..cee39083 100644 --- a/commands/root.go +++ b/commands/root.go @@ -12,7 +12,6 @@ import ( // It's used to avoid cobra to split the Use string at the first space to get the root command name //const rootCommandName = "git\u00A0bug" const rootCommandName = "git-bug" -const messageFilename = "BUG_MESSAGE_EDITMSG" // package scoped var to hold the repo after the PreRun execution var repo repository.Repo |