diff options
author | Michael Muré <batolettre@gmail.com> | 2022-05-01 12:54:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-01 12:54:40 +0200 |
commit | 547d626c2515b764f1fba1cd6b0dee1c69d8f36a (patch) | |
tree | cfcb5f96e49e8109ab69d2f993618625139da41c /commands/show.go | |
parent | 8ee333582ff82d0df971309e94946f2f6e69475b (diff) | |
parent | 3d534a70e906997020a8d44ad0b70b4db3fd6d1b (diff) | |
download | git-bug-547d626c2515b764f1fba1cd6b0dee1c69d8f36a.tar.gz |
Merge pull request #531 from krobelus/complete-bug-ids
Complete bug IDs where appropriate
Diffstat (limited to 'commands/show.go')
-rw-r--r-- | commands/show.go | 6 |
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]") |