<?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-
-<!--
- SPDX-License-Identifier: LGPL-2.1+
-
- This file is part of systemd.
-
- Copyright 2016 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
--->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!-- SPDX-License-Identifier: LGPL-2.1+ -->
<refsect1>
<title>Environment</title>
<term><varname>$SYSTEMD_LESS</varname></term>
<listitem><para>Override the options passed to <command>less</command> (by default
- <literal>FRSXMK</literal>).</para></listitem>
+ <literal>FRSXMK</literal>).</para>
+
+ <para>Users might want to change two options in particular:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><option>K</option></term>
+
+ <para>This option instructs the pager to exit immediately when
+ <keycombo><keycap>Ctrl</keycap><keycap>C</keycap></keycombo> is pressed. To allow
+ <command>less</command> to handle <keycombo><keycap>Ctrl</keycap><keycap>C</keycap></keycombo>
+ itself to switch back to the pager command prompt, unset this option.</para>
+
+ <para>If the value of <varname>$SYSTEMD_LESS</varname> does not include <literal>K</literal>,
+ and the pager that is invoked is <command>less</command>,
+ <keycombo><keycap>Ctrl</keycap><keycap>C</keycap></keycombo> will be ignored by the
+ executable, and needs to be handled by the pager.</para>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>X</option></term>
+
+ <para>This option instructs the pager to not send termcap initialization and deinitialization
+ strings to the terminal. It is set by default to allow command output to remain visible in the
+ terminal even after the pager exits. Nevertheless, this prevents some pager functionality from
+ working, in particular paged output cannot be scrolled with the mouse.</para>
+ </varlistentry>
+ </variablelist>
+
+ <para>See
+ <citerefentry project='man-pages'><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ for more discussion.</para></listitem>
</varlistentry>
<varlistentry id='lesscharset'>
the invoking terminal is determined to be UTF-8 compatible).</para></listitem>
</varlistentry>
- </variablelist>
+ <varlistentry id='colors'>
+ <term><varname>$SYSTEMD_COLORS</varname></term>
+
+ <listitem><para>The value must be a boolean. Controls whether colorized output should be
+ generated. This can be specified to override the decision that <command>systemd</command> makes based
+ on <varname>$TERM</varname> and what the console is connected to.</para>
+ </listitem>
+ </varlistentry>
+
+ <!-- This is not documented on purpose, because it is not clear if $NO_COLOR will become supported
+ widely enough. So let's provide support, but without advertising this.
+ <varlistentry id='no-color'>
+ <term><varname>$NO_COLOR</varname></term>
+
+ <listitem><para>If set (to any value), and <varname>$SYSTEMD_COLORS</varname> is not set, equivalent to
+ <option>SYSTEMD_COLORS=0</option>. See <ulink url="https://no-color.org/">no-color.org</ulink>.</para>
+ </listitem>
+ </varlistentry>
+ -->
+
+ <varlistentry id='urlify'>
+ <term><varname>$SYSTEMD_URLIFY</varname></term>
+
+ <listitem><para>The value must be a boolean. Controls whether clickable links should be generated in
+ the output for terminal emulators supporting this. This can be specified to override the decision that
+ <command>systemd</command> makes based on <varname>$TERM</varname> and other conditions.</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
</refsect1>