diff --git a/cmd/gh/main.go b/cmd/gh/main.go index db329c3cd..d186b658f 100644 --- a/cmd/gh/main.go +++ b/cmd/gh/main.go @@ -61,6 +61,10 @@ func main() { } } + // Enable running gh from explorer.exe. Without this, the user is told to stop and run from a + // terminal. With this, a user can clone a repo (or take other actions) directly from explorer. + cobra.MousetrapHelpText = "" + rootCmd := root.NewCmdRoot(cmdFactory, command.Version, command.BuildDate) cfg, err := cmdFactory.Config() diff --git a/pkg/cmd/root/root.go b/pkg/cmd/root/root.go index 5048027f8..7a82f0cbf 100644 --- a/pkg/cmd/root/root.go +++ b/pkg/cmd/root/root.go @@ -25,8 +25,6 @@ import ( ) func NewCmdRoot(f *cmdutil.Factory, version, buildDate string) *cobra.Command { - cobra.MousetrapHelpText = "" - cmd := &cobra.Command{ Use: "gh [flags]", Short: "GitHub CLI",