summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/systemctl.xml16
-rw-r--r--src/systemctl.c2
2 files changed, 17 insertions, 1 deletions
diff --git a/man/systemctl.xml b/man/systemctl.xml
index a9e86ce17c..2fd2b7bd78 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -1022,6 +1022,22 @@
</refsect1>
<refsect1>
+ <title>Environment</title>
+
+ <variablelist>
+ <varlistentry>
+ <term><varname>$SYSTEMD_PAGER</varname></term>
+ <listitem><para>Pager to use when
+ <option>--no-pager</option> is not given;
+ overrides <varname>$PAGER</varname>. Setting
+ this to an empty string or the value
+ <literal>cat</literal> is equivalent to passing
+ <option>--no-pager</option>.</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
diff --git a/src/systemctl.c b/src/systemctl.c
index 08c7fabb7a..ab41566577 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;