From bb23b1c3d1b8dd1121e197ba5889f7c65727bec8 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Tue, 16 Jul 2019 20:25:27 -0400 Subject: Determine pager from PAGER environment variable Signed-off-by: Solderpunk --- telem.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/telem.lua b/telem.lua index ddf967a..991544b 100755 --- a/telem.lua +++ b/telem.lua @@ -23,6 +23,10 @@ end if not _EDITOR then _EDITOR = "nano" end +_PAGER = os.getenv("PAGER") +if not _PAGER then + _PAGER = "less" +end _COLOURS = { red=31, @@ -585,7 +589,7 @@ end function do_type_whole() local filename = os.tmpname() do_type_savefile(filename) - os.execute("less " .. filename) + os.execute(_PAGER .. " " .. filename) file.delete(filename) end -- cgit v1.2.3