From c9577f78f0ae85cf0963d76d9cfcf26f9f273f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 18 Jun 2011 16:23:43 +0300 Subject: [PATCH 2/3] 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 deletions(-) diff --git a/man/systemctl.xml b/man/systemctl.xml index e9e3371..8781137 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -1022,6 +1022,22 @@ + 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 systemd1, diff --git a/src/systemctl.c b/src/systemctl.c index 08c7fab..ab41566 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; -- 1.7.5.1