mirror of
https://github.com/cheat/cheat.git
synced 2024-12-22 04:35:06 +01:00
fix(installer): always use more
pager on Windows
This commit is contained in:
parent
6421953183
commit
2a6586b41b
@ -3,11 +3,17 @@ package config
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// Pager attempts to locate a pager that's appropriate for the environment.
|
||||
func Pager() string {
|
||||
|
||||
// default to `more` on Windows
|
||||
if runtime.GOOS == "windows" {
|
||||
return "more"
|
||||
}
|
||||
|
||||
// if $PAGER is set, return the corresponding pager
|
||||
if os.Getenv("PAGER") != "" {
|
||||
return os.Getenv("PAGER")
|
||||
|
Loading…
Reference in New Issue
Block a user