diff --git a/command/root.go b/command/root.go index 6f2927a61..4096306b1 100644 --- a/command/root.go +++ b/command/root.go @@ -76,6 +76,7 @@ func (fe FlagError) Unwrap() error { // RootCmd is the entry point of command-line execution var RootCmd = &cobra.Command{ + Use: "gh [flags]", Short: "GitHub CLI", Long: `Work seamlessly with GitHub from the command line.`, @@ -246,9 +247,7 @@ func rootHelpFunc(command *cobra.Command, s []string) { { "", command.Long}, - {"USAGE", ` - # most gh commands need to be run in a directory containing a GitHub repository. - gh [subcommand] [flags]`}, + {"USAGE", command.UsageString()}, {"CORE COMMANDS", strings.Join(coreCommands, "\n")}, {"ADDITIONAL COMMANDS", strings.Join(additionalCommands, "\n")}, {"EXAMPLES", `