]> err.no Git - systemd/commitdiff
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 a9e86ce17cfaae96c446c6f7ff4bcb75e3c6a812..2fd2b7bd7819a0e5474b9cf584096de60ba5f72e 100644 (file)
                 code otherwise.</para>
         </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>
index 08c7fabb7aca8a6a56d89248624d976b9da62415..ab41566577167f3fe9997328197e831abd1ef496 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;