mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 11:55:44 +03:00
systemctl: Add SYSTEMD_PAGER for setting the pager to use in systemctl
This commit is contained in:
parent
9f7dad774e
commit
abebb5af9a
@ -1021,6 +1021,22 @@
|
|||||||
code otherwise.</para>
|
code otherwise.</para>
|
||||||
</refsect1>
|
</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>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
|
@ -5572,7 +5572,7 @@ static void pager_open(void) {
|
|||||||
if (!on_tty() || arg_no_pager)
|
if (!on_tty() || arg_no_pager)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((pager = getenv("PAGER")))
|
if ((pager = getenv("SYSTEMD_PAGER")) || (pager = getenv("PAGER")))
|
||||||
if (!*pager || streq(pager, "cat"))
|
if (!*pager || streq(pager, "cat"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user