~xenrox/hut-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] pager: honor $PAGER

Details
Message ID
<20230919123006.246-1-benjamin@bitquabit.com>
Sender timestamp
1695112206
DKIM signature
missing
Download raw message
Patch: +5 -1
---
 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
+++ b/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
Details
Message ID
<FEOao8OZBhtOKjm4NcAfJPzbgbOwmhIdp5sxmgBJ-xjD6l2BMHuPl0p_gOmMHEt126xrH_IzYFu5xt4zsnM4Lrq_mv1WAqb_kM7JH-7AKQY=@emersion.fr>
In-Reply-To
<20230919123006.246-1-benjamin@bitquabit.com> (view parent)
Sender timestamp
1695133677
DKIM signature
missing
Download raw message
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!
Reply to thread Export thread (mbox)