aboutsummaryrefslogtreecommitdiffstats
path: root/commands/show.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/show.go')
-rw-r--r--commands/show.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/commands/show.go b/commands/show.go
index 55140357..16747214 100644
--- a/commands/show.go
+++ b/commands/show.go
@@ -29,13 +29,17 @@ func newShowCommand() *cobra.Command {
RunE: closeBackend(env, func(cmd *cobra.Command, args []string) error {
return runShow(env, options, args)
}),
+ ValidArgsFunction: completeBug(env),
}
flags := cmd.Flags()
flags.SortFlags = false
+ fields := []string{"author", "authorEmail", "createTime", "lastEdit", "humanId",
+ "id", "labels", "shortId", "status", "title", "actors", "participants"}
flags.StringVarP(&options.fields, "field", "", "",
- "Select field to display. Valid values are [author,authorEmail,createTime,lastEdit,humanId,id,labels,shortId,status,title,actors,participants]")
+ "Select field to display. Valid values are ["+strings.Join(fields, ",")+"]")
+ cmd.RegisterFlagCompletionFunc("by", completeFrom(fields))
flags.StringVarP(&options.format, "format", "f", "default",
"Select the output formatting style. Valid values are [default,json,org-mode]")