Detailed changes
@@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
)
-func runCloseBug(cmd *cobra.Command, args []string) error {
+func runStatusClose(cmd *cobra.Command, args []string) error {
if len(args) > 1 {
return errors.New("Only closing one bug at a time is supported")
}
@@ -40,9 +40,9 @@ func runCloseBug(cmd *cobra.Command, args []string) error {
var closeCmd = &cobra.Command{
Use: "close <id>",
Short: "Mark the bug as closed",
- RunE: runCloseBug,
+ RunE: runStatusClose,
}
func init() {
- RootCmd.AddCommand(closeCmd)
+ statusCmd.AddCommand(closeCmd)
}
@@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
)
-func runOpenBug(cmd *cobra.Command, args []string) error {
+func runStatusOpen(cmd *cobra.Command, args []string) error {
if len(args) > 1 {
return errors.New("Only opening one bug at a time is supported")
}
@@ -40,9 +40,9 @@ func runOpenBug(cmd *cobra.Command, args []string) error {
var openCmd = &cobra.Command{
Use: "open <id>",
Short: "Mark the bug as open",
- RunE: runOpenBug,
+ RunE: runStatusOpen,
}
func init() {
- RootCmd.AddCommand(openCmd)
+ statusCmd.AddCommand(openCmd)
}
@@ -0,0 +1,29 @@
+.TH "GIT-BUG" "1" "Sep 2018" "Generated from git-bug's source code" ""
+.nh
+.ad l
+
+
+.SH NAME
+.PP
+git\-bug\-status\-close \- Mark the bug as closed
+
+
+.SH SYNOPSIS
+.PP
+\fBgit\-bug status close <id> [flags]\fP
+
+
+.SH DESCRIPTION
+.PP
+Mark the bug as closed
+
+
+.SH OPTIONS
+.PP
+\fB\-h\fP, \fB\-\-help\fP[=false]
+ help for close
+
+
+.SH SEE ALSO
+.PP
+\fBgit\-bug\-status(1)\fP
@@ -0,0 +1,29 @@
+.TH "GIT-BUG" "1" "Sep 2018" "Generated from git-bug's source code" ""
+.nh
+.ad l
+
+
+.SH NAME
+.PP
+git\-bug\-status\-open \- Mark the bug as open
+
+
+.SH SYNOPSIS
+.PP
+\fBgit\-bug status open <id> [flags]\fP
+
+
+.SH DESCRIPTION
+.PP
+Mark the bug as open
+
+
+.SH OPTIONS
+.PP
+\fB\-h\fP, \fB\-\-help\fP[=false]
+ help for open
+
+
+.SH SEE ALSO
+.PP
+\fBgit\-bug\-status(1)\fP
@@ -26,4 +26,4 @@ Show the bug status
.SH SEE ALSO
.PP
-\fBgit\-bug(1)\fP
+\fBgit\-bug(1)\fP, \fBgit\-bug\-status\-close(1)\fP, \fBgit\-bug\-status\-open(1)\fP
@@ -29,4 +29,4 @@ It use the same internal storage so it doesn't pollute your project. As you woul
.SH SEE ALSO
.PP
-\fBgit\-bug\-add(1)\fP, \fBgit\-bug\-close(1)\fP, \fBgit\-bug\-commands(1)\fP, \fBgit\-bug\-comment(1)\fP, \fBgit\-bug\-label(1)\fP, \fBgit\-bug\-ls(1)\fP, \fBgit\-bug\-open(1)\fP, \fBgit\-bug\-pull(1)\fP, \fBgit\-bug\-push(1)\fP, \fBgit\-bug\-show(1)\fP, \fBgit\-bug\-status(1)\fP, \fBgit\-bug\-termui(1)\fP, \fBgit\-bug\-title(1)\fP, \fBgit\-bug\-webui(1)\fP
+\fBgit\-bug\-add(1)\fP, \fBgit\-bug\-commands(1)\fP, \fBgit\-bug\-comment(1)\fP, \fBgit\-bug\-label(1)\fP, \fBgit\-bug\-ls(1)\fP, \fBgit\-bug\-pull(1)\fP, \fBgit\-bug\-push(1)\fP, \fBgit\-bug\-show(1)\fP, \fBgit\-bug\-status(1)\fP, \fBgit\-bug\-termui(1)\fP, \fBgit\-bug\-title(1)\fP, \fBgit\-bug\-webui(1)\fP
@@ -21,12 +21,10 @@ git-bug [flags]
### SEE ALSO
* [git-bug add](git-bug_add.md) - Create a new bug
-* [git-bug close](git-bug_close.md) - Mark the bug as closed
* [git-bug commands](git-bug_commands.md) - Display available commands
* [git-bug comment](git-bug_comment.md) - Show a bug's comments
* [git-bug label](git-bug_label.md) - Manipulate bug's label
* [git-bug ls](git-bug_ls.md) - List bugs
-* [git-bug open](git-bug_open.md) - Mark the bug as open
* [git-bug pull](git-bug_pull.md) - Pull bugs update from a git remote
* [git-bug push](git-bug_push.md) - Push bugs update to a git remote
* [git-bug show](git-bug_show.md) - Display the details of a bug
@@ -19,4 +19,6 @@ git-bug status <id> [flags]
### SEE ALSO
* [git-bug](git-bug.md) - A bugtracker embedded in Git
+* [git-bug status close](git-bug_status_close.md) - Mark the bug as closed
+* [git-bug status open](git-bug_status_open.md) - Mark the bug as open
@@ -0,0 +1,22 @@
+## git-bug status close
+
+Mark the bug as closed
+
+### Synopsis
+
+Mark the bug as closed
+
+```
+git-bug status close <id> [flags]
+```
+
+### Options
+
+```
+ -h, --help help for close
+```
+
+### SEE ALSO
+
+* [git-bug status](git-bug_status.md) - Show the bug status
+
@@ -0,0 +1,22 @@
+## git-bug status open
+
+Mark the bug as open
+
+### Synopsis
+
+Mark the bug as open
+
+```
+git-bug status open <id> [flags]
+```
+
+### Options
+
+```
+ -h, --help help for open
+```
+
+### SEE ALSO
+
+* [git-bug status](git-bug_status.md) - Show the bug status
+
@@ -277,26 +277,6 @@ _git-bug_add()
noun_aliases=()
}
-_git-bug_close()
-{
- last_command="git-bug_close"
-
- command_aliases=()
-
- commands=()
-
- flags=()
- two_word_flags=()
- local_nonpersistent_flags=()
- flags_with_completion=()
- flags_completion=()
-
-
- must_have_one_flag=()
- must_have_one_noun=()
- noun_aliases=()
-}
-
_git-bug_commands()
{
last_command="git-bug_commands"
@@ -428,9 +408,9 @@ _git-bug_ls()
noun_aliases=()
}
-_git-bug_open()
+_git-bug_pull()
{
- last_command="git-bug_open"
+ last_command="git-bug_pull"
command_aliases=()
@@ -448,9 +428,9 @@ _git-bug_open()
noun_aliases=()
}
-_git-bug_pull()
+_git-bug_push()
{
- last_command="git-bug_pull"
+ last_command="git-bug_push"
command_aliases=()
@@ -468,9 +448,9 @@ _git-bug_pull()
noun_aliases=()
}
-_git-bug_push()
+_git-bug_show()
{
- last_command="git-bug_push"
+ last_command="git-bug_show"
command_aliases=()
@@ -488,9 +468,29 @@ _git-bug_push()
noun_aliases=()
}
-_git-bug_show()
+_git-bug_status_close()
{
- last_command="git-bug_show"
+ last_command="git-bug_status_close"
+
+ command_aliases=()
+
+ commands=()
+
+ flags=()
+ two_word_flags=()
+ local_nonpersistent_flags=()
+ flags_with_completion=()
+ flags_completion=()
+
+
+ must_have_one_flag=()
+ must_have_one_noun=()
+ noun_aliases=()
+}
+
+_git-bug_status_open()
+{
+ last_command="git-bug_status_open"
command_aliases=()
@@ -515,6 +515,8 @@ _git-bug_status()
command_aliases=()
commands=()
+ commands+=("close")
+ commands+=("open")
flags=()
two_word_flags=()
@@ -623,12 +625,10 @@ _git-bug_root_command()
commands=()
commands+=("add")
- commands+=("close")
commands+=("commands")
commands+=("comment")
commands+=("label")
commands+=("ls")
- commands+=("open")
commands+=("pull")
commands+=("push")
commands+=("show")
@@ -8,7 +8,7 @@ case $state in
level1)
case $words[1] in
git-bug)
- _arguments '1: :(add close commands comment label ls open pull push show status termui title webui)'
+ _arguments '1: :(add commands comment label ls pull push show status termui title webui)'
;;
*)
_arguments '*: :_files'
@@ -20,6 +20,9 @@ case $state in
comment)
_arguments '2: :(add)'
;;
+ status)
+ _arguments '2: :(close open)'
+ ;;
title)
_arguments '2: :(edit)'
;;