[systemd-devel] [PATCH] pager: remove --no-init setting from LESS options

Jason A. Donenfeld Jason at zx2c4.com
Tue Feb 11 11:05:27 PST 2014

On Tue, Feb 11, 2014 at 6:40 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> I think adding support for $SYSTEMD_LESS which is copied to $LESS right
> before invoking less would be a good choice, since it would allow people
> to override whatever systemd tries to set.

So something along the lines of:

user_less = getenv("SYSTEMD_LESS");
if (!user_less) {
   if (scroll_to_end)
       final_less = "FRSXMK+G";
       final_less = "FRSXMK";
} else {
   if (scroll_to_end)
     final_less = concat(user_less, "+G");
      final_less = user_less;

More information about the systemd-devel mailing list