---
pager.go | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pager.go b/pager.go
index 7b8b6d0..b5cbb39 100644
--- a/pager.go
@@ -19,7 +19,11 @@ func newPager() pager {
return &singleWritePager{os.Stdout, true}
}
- cmd := exec.Command("less")
+ pgrcmd, ok := os.LookupEnv("PAGER")
+ if !ok {
+ pgrcmd = "less"
+ }
+ cmd := exec.Command(pgrcmd)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Env = append(os.Environ(), "LESS=FRX")
--
2.42.0.windows.2
In general I'm not a fan of env-vars-as-a-config-file, but PAGER is
somewhat of a de facto standard. Pushed, thanks!