[systemd-commits] man/systemctl.xml src/systemctl.c

Lennart Poettering lennart at kemper.freedesktop.org
Mon Jun 20 09:00:33 PDT 2011


 man/systemctl.xml |   16 ++++++++++++++++
 src/systemctl.c   |    2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit abebb5af9a7f5da77425aab1ecadd9bfcad53009
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Jun 18 16:23:43 2011 +0300

    systemctl: Add SYSTEMD_PAGER for setting the pager to use in systemctl

diff --git a/man/systemctl.xml b/man/systemctl.xml
index a9e86ce..2fd2b7b 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 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;
 



More information about the systemd-commits mailing list