chiark / gitweb /
systemctl: Add SYSTEMD_PAGER for setting the pager to use in systemctl
authorVille Skyttä <ville.skytta@iki.fi>
Sat, 18 Jun 2011 13:23:43 +0000 (16:23 +0300)
committerLennart Poettering <lennart@poettering.net>
Mon, 20 Jun 2011 15:59:59 +0000 (17:59 +0200)
man/systemctl.xml
src/systemctl.c

index a9e86ce..2fd2b7b 100644 (file)
         </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>,
index 08c7fab..ab41566 100644 (file)
@@ -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;