From abebb5af9a7f5da77425aab1ecadd9bfcad53009 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Skytt=C3=A4?= Date: Sat, 18 Jun 2011 16:23:43 +0300 Subject: [PATCH] systemctl: Add SYSTEMD_PAGER for setting the pager to use in systemctl --- man/systemctl.xml | 16 ++++++++++++++++ src/systemctl.c | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/man/systemctl.xml b/man/systemctl.xml index a9e86ce1..2fd2b7bd 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 08c7fabb..ab415665 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; -- 2.39.5