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;