X Tutup
Skip to content

Commit 9b2fe1e

Browse files
committed
Disable pager when set to "cat"
1 parent e240356 commit 9b2fe1e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

internal/config/config_type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func NewBlankRoot() *yaml.Node {
181181
Value: PromptsEnabled,
182182
},
183183
{
184-
HeadComment: "A pager program to send command output to. Example value: less",
184+
HeadComment: "A pager program to send command output to, e.g. \"less\". Set the value to \"cat\" to disable the pager.",
185185
Kind: yaml.ScalarNode,
186186
Value: "pager",
187187
},

internal/config/config_type_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func Test_defaultConfig(t *testing.T) {
4545
editor:
4646
# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled
4747
prompt: enabled
48-
# A pager program to send command output to. Example value: less
48+
# A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager.
4949
pager:
5050
# Aliases allow you to create nicknames for gh commands
5151
aliases:

pkg/iostreams/iostreams.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func (s *IOStreams) SetPager(cmd string) {
138138
}
139139

140140
func (s *IOStreams) StartPager() error {
141-
if s.pagerCommand == "" || !s.IsStdoutTTY() {
141+
if s.pagerCommand == "" || s.pagerCommand == "cat" || !s.IsStdoutTTY() {
142142
return nil
143143
}
144144

0 commit comments

Comments
 (0)
X Tutup