diff options
author | Jocelyn FACCHINI <jocelyn.facchini@gmail.com> | 2019-03-23 16:59:40 +0000 |
---|---|---|
committer | Jocelyn FACCHINI <jocelyn.facchini@gmail.com> | 2019-03-23 16:59:40 +0000 |
commit | 146b6b8599f370284d6bbe7370e9ebeb7999f3cd (patch) | |
tree | bd7b9c13eadcf737fd0a0cfd11749ec3776d7e9b /commands | |
parent | 90f1089dc9c9b33bf5f3a37e0ee0414344246b05 (diff) | |
download | git-bug-146b6b8599f370284d6bbe7370e9ebeb7999f3cd.tar.gz |
Select and Label command documentation
- Informed that label command adds/removes a label to a given bug.
- Added suggestion to use select command when omitting to provide a bug id as argument.
- Added a bit more detail for the select command documentation, giving a hint to "deselect" command.
Diffstat (limited to 'commands')
-rw-r--r-- | commands/label.go | 2 | ||||
-rw-r--r-- | commands/label_add.go | 2 | ||||
-rw-r--r-- | commands/label_rm.go | 2 | ||||
-rw-r--r-- | commands/select.go | 11 | ||||
-rw-r--r-- | commands/select/select.go | 2 |
5 files changed, 15 insertions, 4 deletions
diff --git a/commands/label.go b/commands/label.go index 4f15c893..a07e9efc 100644 --- a/commands/label.go +++ b/commands/label.go @@ -33,7 +33,7 @@ func runLabel(cmd *cobra.Command, args []string) error { var labelCmd = &cobra.Command{ Use: "label [<id>]", - Short: "Display, add or remove labels.", + Short: "Display, add or remove labels to/from a bug.", PreRunE: loadRepo, RunE: runLabel, } diff --git a/commands/label_add.go b/commands/label_add.go index b936bc37..6e2679d9 100644 --- a/commands/label_add.go +++ b/commands/label_add.go @@ -37,7 +37,7 @@ func runLabelAdd(cmd *cobra.Command, args []string) error { var labelAddCmd = &cobra.Command{ Use: "add [<id>] <label>[...]", - Short: "Add a label.", + Short: "Add a label to a bug.", PreRunE: loadRepo, RunE: runLabelAdd, } diff --git a/commands/label_rm.go b/commands/label_rm.go index c03a20d9..a0c1c56d 100644 --- a/commands/label_rm.go +++ b/commands/label_rm.go @@ -37,7 +37,7 @@ func runLabelRm(cmd *cobra.Command, args []string) error { var labelRmCmd = &cobra.Command{ Use: "rm [<id>] <label>[...]", - Short: "Remove a label.", + Short: "Remove a label from a bug.", PreRunE: loadRepo, RunE: runLabelRm, } diff --git a/commands/select.go b/commands/select.go index 6b214961..ea57c282 100644 --- a/commands/select.go +++ b/commands/select.go @@ -46,6 +46,17 @@ var selectCmd = &cobra.Command{ git bug comment git bug status `, + Long: `Select a bug for implicit use in future commands. + +This command allows you to omit any bug <id> argument for the following commands: + - git bug comment + - git bug label + - git bug show + - git bug status + - git bug title + +The complementary command is "git bug deselect" performing the opposite operation. +`, PreRunE: loadRepo, RunE: runSelect, } diff --git a/commands/select/select.go b/commands/select/select.go index 522cc295..b080d277 100644 --- a/commands/select/select.go +++ b/commands/select/select.go @@ -16,7 +16,7 @@ import ( const selectFile = "select" -var ErrNoValidId = errors.New("you must provide a bug id") +var ErrNoValidId = errors.New("you must provide a bug id or use the \"select\" command first") // ResolveBug first try to resolve a bug using the first argument of the command // line. If it fails, it fallback to the select mechanism. |