From 5e3aa31cf1436b06dd4587f900f810fb9e46a37c Mon Sep 17 00:00:00 2001 From: Toshiya Doi Date: Fri, 13 Mar 2020 23:58:41 +0900 Subject: [PATCH 1/2] Fix 'gh issue view' usage description --- command/issue.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/issue.go b/command/issue.go index 8d83e392b..91f2aa2a3 100644 --- a/command/issue.go +++ b/command/issue.go @@ -67,7 +67,7 @@ var issueStatusCmd = &cobra.Command{ RunE: issueStatus, } var issueViewCmd = &cobra.Command{ - Use: "view { | | }", + Use: "view { | }", Args: func(cmd *cobra.Command, args []string) error { if len(args) < 1 { return FlagError{errors.New("issue number or URL required as argument")} From 102cfdb1a25c7275ac6bb335a8dcf7c9784e01df Mon Sep 17 00:00:00 2001 From: Toshiya Doi Date: Fri, 13 Mar 2020 23:59:18 +0900 Subject: [PATCH 2/2] Rearrange the order of command initialization --- command/issue.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/issue.go b/command/issue.go index 91f2aa2a3..2b85efc75 100644 --- a/command/issue.go +++ b/command/issue.go @@ -23,7 +23,6 @@ import ( func init() { RootCmd.AddCommand(issueCmd) issueCmd.AddCommand(issueStatusCmd) - issueCmd.AddCommand(issueViewCmd) issueCmd.AddCommand(issueCreateCmd) issueCreateCmd.Flags().StringP("title", "t", "", @@ -39,6 +38,7 @@ func init() { issueListCmd.Flags().IntP("limit", "L", 30, "Maximum number of issues to fetch") issueListCmd.Flags().StringP("author", "A", "", "Filter by author") + issueCmd.AddCommand(issueViewCmd) issueViewCmd.Flags().BoolP("preview", "p", false, "Display preview of issue content") }