Fix usage synopsis for pr view

Indicate that the argument is optional
This commit is contained in:
Mislav Marohnić 2020-01-23 10:26:57 +01:00
parent 50a89564a7
commit 305410cdee

View file

@ -67,9 +67,13 @@ var prStatusCmd = &cobra.Command{
RunE: prStatus,
}
var prViewCmd = &cobra.Command{
Use: "view {<number> | <url> | <branch>}",
Use: "view [{<number> | <url> | <branch>}]",
Short: "View a pull request in the browser",
RunE: prView,
Long: `View a pull request specified by the argument in the browser.
Without an argument, the pull request that belongs to the current
branch is opened.`,
RunE: prView,
}
func prStatus(cmd *cobra.Command, args []string) error {