mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit cf4bc05010a33ab012c42f46920fd79858a9b52a
parent 13db67713f4f2f4dde8c8dfbf7b2432560ae9230
Author: Leah Neukirchen <leah@vuxu.org>
Date:   Thu, 17 Aug 2017 21:07:46 +0200

mshow: use "less -RFXe" when $PAGER is plain "less"

Diffstat:
mshow.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/mshow.c b/mshow.c @@ -755,8 +755,13 @@ main(int argc, char *argv[]) if (safe_output && isatty(1)) { char *pg; pg = getenv("MBLAZE_PAGER"); - if (!pg) + if (!pg) { pg = getenv("PAGER"); + if (pg && strcmp(pg, "less") == 0) { + static char lesscmd[] = "less -RFXe"; + pg = lesscmd; + } + } if (pg && *pg && strcmp(pg, "cat") != 0) { pid2 = pipeto(pg); if (pid2 < 0)