diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2022-10-10 16:36:54 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2022-10-11 16:34:49 +0200 |
commit | 77508aea59c0d6b826f15d1717b241d2d0121c79 (patch) | |
tree | 93f64503542fc913035a3147bf6949ccdf342d53 | |
parent | 93ec6abf16a5af54b96a9ee953c3cca8cb437449 (diff) |
man/nmcli: document variables affecting fancy output
Notably, PAGER, TERM and NO_COLORS.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1419
-rw-r--r-- | man/nmcli.xml | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/man/nmcli.xml b/man/nmcli.xml index 768087ea46..1caafd3176 100644 --- a/man/nmcli.xml +++ b/man/nmcli.xml @@ -2253,8 +2253,47 @@ unset or null.</para> </listitem> </varlistentry> - </variablelist> + <varlistentry> + <term><envar>NO_COLOR</envar></term> + <listitem> + <para>Default to not producing colored and paged output. The + <option>--colors</option> option, if used, takes precedence.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><envar>PAGER</envar></term> + <listitem> + <para>Filter to pipe the output through if it doesn't fit on a screen. + Can be a file name of an executable or a shell command. Empty string to + disable the functionality.</para> + + <para>Note that the pager command is expected to handle wide characters + and ANSI escape sequences for changing colors (unless they're disabled). + <command>nmcli</command> sets up the environment variables + <envar>LESS</envar> and <envar>LESSCHARSET</envar> appropriately for the + <citerefentry><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry> + pager, other pagers may or may not need extra configuration.</para> + + <para>If unspecified, + <citerefentry><refentrytitle>pager</refentrytitle><manvolnum>1</manvolnum></citerefentry>, + <citerefentry><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry> + and <citerefentry><refentrytitle>more</refentrytitle><manvolnum>1</manvolnum></citerefentry> + will be tried (in that order).</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><envar>TERM</envar></term> + <listitem> + <para>Terminal type. If <literal>dumb</literal>, <command>nmcli</command> + will not use a pager or produce ANSI escape sequences for coloring.</para> + <para>Terminal types other than <literal>dumb</literal> are assumed to + support ASCII escape sequences for setting the output color.</para> + </listitem> + </varlistentry> + </variablelist> </refsect1> <refsect1 id='internationalization_notes'><title>Internationalization notes</title> |