Disable pager when set to "cat"
This commit is contained in:
parent
e24035681d
commit
9b2fe1ee30
3 changed files with 3 additions and 3 deletions
|
|
@ -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",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue