aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-04-03 21:33:04 +0200
committerMichael Muré <batolettre@gmail.com>2019-04-03 21:33:04 +0200
commit96d356a34d6eec18c987415aad0b2fa92304c98d (patch)
treeeeae62c365f7019c5ff82a2aa1d047e0f90c131a
parenta64aaacc03a00394ea172d99e23b96ae11d9c1c9 (diff)
downloadgit-bug-96d356a34d6eec18c987415aad0b2fa92304c98d.tar.gz
commands: add "show --field humanId"
-rw-r--r--commands/show.go4
-rw-r--r--doc/man/git-bug-show.12
-rw-r--r--doc/md/git-bug_show.md2
3 files changed, 5 insertions, 3 deletions
diff --git a/commands/show.go b/commands/show.go
index 7d7aafbf..f7f8ecd5 100644
--- a/commands/show.go
+++ b/commands/show.go
@@ -45,6 +45,8 @@ func runShowBug(cmd *cobra.Command, args []string) error {
fmt.Printf("%s\n", firstComment.Author.Email())
case "createTime":
fmt.Printf("%s\n", firstComment.FormatTime())
+ case "humanId":
+ fmt.Printf("%s\n", snapshot.HumanId())
case "id":
fmt.Printf("%s\n", snapshot.Id())
case "labels":
@@ -124,5 +126,5 @@ var showCmd = &cobra.Command{
func init() {
RootCmd.AddCommand(showCmd)
showCmd.Flags().StringVarP(&showFieldsQuery, "field", "f", "",
- "Select field to display. Valid values are [author,authorEmail,createTime,id,labels,shortId,status,title]")
+ "Select field to display. Valid values are [author,authorEmail,createTime,humanId,id,labels,shortId,status,title]")
}
diff --git a/doc/man/git-bug-show.1 b/doc/man/git-bug-show.1
index 75315f00..3dfb4419 100644
--- a/doc/man/git-bug-show.1
+++ b/doc/man/git-bug-show.1
@@ -21,7 +21,7 @@ Display the details of a bug.
.SH OPTIONS
.PP
\fB\-f\fP, \fB\-\-field\fP=""
- Select field to display. Valid values are [author,authorEmail,createTime,id,labels,shortId,status,title]
+ Select field to display. Valid values are [author,authorEmail,createTime,humanId,id,labels,shortId,status,title]
.PP
\fB\-h\fP, \fB\-\-help\fP[=false]
diff --git a/doc/md/git-bug_show.md b/doc/md/git-bug_show.md
index 86f3cfce..21d5460c 100644
--- a/doc/md/git-bug_show.md
+++ b/doc/md/git-bug_show.md
@@ -13,7 +13,7 @@ git-bug show [<id>] [flags]
### Options
```
- -f, --field string Select field to display. Valid values are [author,authorEmail,createTime,id,labels,shortId,status,title]
+ -f, --field string Select field to display. Valid values are [author,authorEmail,createTime,humanId,id,labels,shortId,status,title]
-h, --help help for show
```