diff --git a/internal/config/config_type.go b/internal/config/config_type.go index 663255bd5..0fd85d7f0 100644 --- a/internal/config/config_type.go +++ b/internal/config/config_type.go @@ -181,7 +181,7 @@ func NewBlankRoot() *yaml.Node { Value: PromptsEnabled, }, { - HeadComment: "A pager program to send command output to. Example value: less", + HeadComment: "A pager program to send command output to, e.g. \"less\". Set the value to \"cat\" to disable the pager.", Kind: yaml.ScalarNode, Value: "pager", }, diff --git a/internal/config/config_type_test.go b/internal/config/config_type_test.go index 28191dfad..c9f33b45c 100644 --- a/internal/config/config_type_test.go +++ b/internal/config/config_type_test.go @@ -45,7 +45,7 @@ func Test_defaultConfig(t *testing.T) { editor: # When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled prompt: enabled - # A pager program to send command output to. Example value: less + # A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager. pager: # Aliases allow you to create nicknames for gh commands aliases: diff --git a/pkg/iostreams/iostreams.go b/pkg/iostreams/iostreams.go index d13d7b542..19bdd546a 100644 --- a/pkg/iostreams/iostreams.go +++ b/pkg/iostreams/iostreams.go @@ -138,7 +138,7 @@ func (s *IOStreams) SetPager(cmd string) { } func (s *IOStreams) StartPager() error { - if s.pagerCommand == "" || !s.IsStdoutTTY() { + if s.pagerCommand == "" || s.pagerCommand == "cat" || !s.IsStdoutTTY() { return nil }