From: Ville Skyttä Date: Sat, 18 Jun 2011 13:23:43 +0000 (+0300) Subject: systemctl: Add SYSTEMD_PAGER for setting the pager to use in systemctl X-Git-Tag: v30~192 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=abebb5af9a7f5da77425aab1ecadd9bfcad53009;ds=sidebyside systemctl: Add SYSTEMD_PAGER for setting the pager to use in systemctl --- diff --git a/man/systemctl.xml b/man/systemctl.xml index a9e86ce17..2fd2b7bd7 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -1021,6 +1021,22 @@ code otherwise. + + Environment + + + + $SYSTEMD_PAGER + Pager to use when + is not given; + overrides $PAGER. Setting + this to an empty string or the value + cat is equivalent to passing + . + + + + See Also diff --git a/src/systemctl.c b/src/systemctl.c index 08c7fabb7..ab4156657 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -5572,7 +5572,7 @@ static void pager_open(void) { if (!on_tty() || arg_no_pager) return; - if ((pager = getenv("PAGER"))) + if ((pager = getenv("SYSTEMD_PAGER")) || (pager = getenv("PAGER"))) if (!*pager || streq(pager, "cat")) return;