diff --git a/pkg/cmd/root/help_topic.go b/pkg/cmd/root/help_topic.go index 90f157c6b..06cc04517 100644 --- a/pkg/cmd/root/help_topic.go +++ b/pkg/cmd/root/help_topic.go @@ -9,7 +9,20 @@ var HelpTopics = map[string]map[string]string{ "mintty": { "short": "Information about using gh with MinTTY", "long": heredoc.Doc(` - TODO + MinTTY is the terminal emulator that comes by default with Git + for Windows. It has known issues with gh's ability to prompt a + user for input. + + There are a few workarounds to make gh work with MinTTY: + + - Reinstall Git for Windows. + Be sure to check the box "Enable experimental support for pseudo consoles". + + - Use a different terminal emulator with Git for Windows like Windows Terminal or cmd.exe. + Try running "C:\Program Files\Git\bin\bash.exe" in one of those other terminal emulators. + + - Prefix invocations of gh with winpty, eg: "winpty gh auth login". + NOTE: this can lead to some UI bugs. `), }, "environment": { diff --git a/pkg/cmd/root/root.go b/pkg/cmd/root/root.go index 67b81ca62..b60d16012 100644 --- a/pkg/cmd/root/root.go +++ b/pkg/cmd/root/root.go @@ -103,6 +103,7 @@ func NewCmdRoot(f *cmdutil.Factory, version, buildDate string) *cobra.Command { // Help topics cmd.AddCommand(NewHelpTopic("environment")) cmd.AddCommand(NewHelpTopic("formatting")) + cmd.AddCommand(NewHelpTopic("mintty")) referenceCmd := NewHelpTopic("reference") referenceCmd.SetHelpFunc(referenceHelpFn(f.IOStreams)) cmd.AddCommand(referenceCmd)