diff options
author | Ryan Kavanagh <rak@rak.ac> | 2019-07-16 20:25:27 -0400 |
---|---|---|
committer | Solderpunk <solderpunk@sdf.org> | 2019-08-31 10:32:30 +0000 |
commit | bb23b1c3d1b8dd1121e197ba5889f7c65727bec8 (patch) | |
tree | cc3135189ce3dd9f415eee88d8289acc0fb9a85a /telem.lua | |
parent | Merge /home/solderpunk/telem (diff) |
Determine pager from PAGER environment variable
Signed-off-by: Solderpunk <solderpunk@sdf.org>
Diffstat (limited to '')
-rwxr-xr-x | telem.lua | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |