summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2018-10-31 13:46:07 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2018-11-05 09:32:20 +0100
commitd76ac490f570ac835dd1f9e8ad54047a4910d9e7 (patch)
tree8f53b31f1b1a0a5bc9da5b3191d267cc16e7cebc
parent9958df36e5b761c8e906da3e3706d519d7b1c2fd (diff)
downloadNetworkManager-d76ac490f570ac835dd1f9e8ad54047a4910d9e7.tar.gz
cli: sort options in man page and program help
Options are displayed in a random order, sort them.
-rw-r--r--clients/cli/nmcli.c16
-rw-r--r--man/nmcli.xml208
2 files changed, 112 insertions, 112 deletions
diff --git a/clients/cli/nmcli.c b/clients/cli/nmcli.c
index df152c1f87..d28bd519fe 100644
--- a/clients/cli/nmcli.c
+++ b/clients/cli/nmcli.c
@@ -245,19 +245,19 @@ usage (void)
g_printerr (_("Usage: nmcli [OPTIONS] OBJECT { COMMAND | help }\n"
"\n"
"OPTIONS\n"
- " -o[verview] overview mode (hide default values)\n"
- " -t[erse] terse output\n"
- " -p[retty] pretty output\n"
- " -m[ode] tabular|multiline output mode\n"
+ " -a[sk] ask for missing parameters\n"
" -c[olors] auto|yes|no whether to use colors in output\n"
+ " -e[scape] yes|no escape columns separators in values\n"
" -f[ields] <field1,field2,...>|all|common specify fields to output\n"
" -g[et-values] <field1,field2,...>|all|common shortcut for -m tabular -t -f\n"
- " -e[scape] yes|no escape columns separators in values\n"
- " -a[sk] ask for missing parameters\n"
+ " -h[elp] print this help\n"
+ " -m[ode] tabular|multiline output mode\n"
+ " -o[verview] overview mode (hide default values)\n"
+ " -p[retty] pretty output\n"
" -s[how-secrets] allow displaying passwords\n"
- " -w[ait] <seconds> set timeout waiting for finishing operations\n"
+ " -t[erse] terse output\n"
" -v[ersion] show program version\n"
- " -h[elp] print this help\n"
+ " -w[ait] <seconds> set timeout waiting for finishing operations\n"
"\n"
"OBJECT\n"
" g[eneral] NetworkManager's general status and operations\n"
diff --git a/man/nmcli.xml b/man/nmcli.xml
index 2a0765d0ab..b98651a799 100644
--- a/man/nmcli.xml
+++ b/man/nmcli.xml
@@ -95,98 +95,73 @@
<varlistentry>
<term><group choice='plain'>
- <arg choice='plain'><option>-t</option></arg>
- <arg choice='plain'><option>--terse</option></arg>
+ <arg choice='plain'><option>-a</option></arg>
+ <arg choice='plain'><option>--ask</option></arg>
</group></term>
<listitem>
- <para>Output is terse. This mode is designed and suitable for computer (script)
- processing.</para>
+ <para>When using this option <command>nmcli</command> will stop and ask for any
+ missing required arguments, so do not use this option for non-interactive
+ purposes like scripts. This option controls, for example, whether you will be
+ prompted for a password if it is required for connecting to a network.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><group choice='plain'>
- <arg choice='plain'><option>-p</option></arg>
- <arg choice='plain'><option>--pretty</option></arg>
+ <arg choice='plain'><option>-c</option></arg>
+ <arg choice='plain'><option>--colors</option></arg>
+ <group choice='req'>
+ <arg choice='plain'>yes</arg>
+ <arg choice='plain'>no</arg>
+ <arg choice='plain'>auto</arg>
+ </group>
</group></term>
<listitem>
- <para>Output is pretty. This causes <command>nmcli</command> to produce easily
- readable outputs for humans, i.e. values are aligned, headers are printed,
- etc.</para>
+ <para>This option controls color output (using terminal escape sequences).
+ <literal>yes</literal> enables colors, <literal>no</literal> disables them,
+ <literal>auto</literal> only produces colors when standard output is directed
+ to a terminal. The default value is <literal>auto</literal>.</para>
+ <para>The actual colors used are configured as described in
+ <citerefentry><refentrytitle>terminal-colors.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+ Please refer to the <link linkend='colors' endterm='colors.title' /> section for a
+ list of color names supported by <command>nmcli</command>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><group choice='plain'>
- <arg choice='plain'><option>-m</option></arg>
- <arg choice='plain'><option>--mode</option></arg>
- <group choice='req'>
- <arg choice='plain'>tabular</arg>
- <arg choice='plain'>multiline</arg>
- </group>
+ <arg choice='plain'><option>--complete-args</option></arg>
</group></term>
<listitem>
- <para>Switch between tabular and multiline output:</para>
-
- <variablelist>
- <varlistentry>
- <term><arg choice='plain'>tabular</arg></term>
- <listitem>
- <para>Output is a table where each line describes a single entry.
- Columns define particular properties of the entry.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><arg choice='plain'>multiline</arg></term>
- <listitem>
- <para>Each entry comprises multiple lines, each property on its
- own line. The values are prefixed with the property name.</para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <para>If omitted, default is <literal>tabular</literal> for most commands.
- For the commands producing more structured information, that cannot be
- displayed on a single line, default is <literal>multiline</literal>.
- Currently, they are:</para>
-
- <itemizedlist>
- <listitem>
- <para><literal>nmcli connection show <replaceable>ID</replaceable></literal></para>
- </listitem>
+ <para>Instead of conducting the desired action, <command>nmcli</command>
+ will list possible completions for the last argument. This is useful to implement
+ argument completion in shell.</para>
- <listitem>
- <para><literal>nmcli device show</literal></para>
- </listitem>
- </itemizedlist>
+ <para>The <link linkend='exit_status'>exit status</link> will indicate success
+ or return a code 65 to indicate the last argument is a file name.</para>
+ <para>NetworkManager ships with command completion support for GNU Bash.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><group choice='plain'>
- <arg choice='plain'><option>-c</option></arg>
- <arg choice='plain'><option>--colors</option></arg>
+ <arg choice='plain'><option>-e</option></arg>
+ <arg choice='plain'><option>--escape</option></arg>
<group choice='req'>
<arg choice='plain'>yes</arg>
<arg choice='plain'>no</arg>
- <arg choice='plain'>auto</arg>
</group>
</group></term>
<listitem>
- <para>This option controls color output (using terminal escape sequences).
- <literal>yes</literal> enables colors, <literal>no</literal> disables them,
- <literal>auto</literal> only produces colors when standard output is directed
- to a terminal. The default value is <literal>auto</literal>.</para>
- <para>The actual colors used are configured as described in
- <citerefentry><refentrytitle>terminal-colors.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
- Please refer to the <link linkend='colors' endterm='colors.title' /> section for a
- list of color names supported by <command>nmcli</command>.</para>
+ <para>Whether to escape <literal>:</literal> and <literal>\</literal> characters in terse tabular mode. The
+ escape character is <literal>\</literal>.</para>
+
+ <para>If omitted, default is <literal>yes</literal>.</para>
</listitem>
</varlistentry>
@@ -238,33 +213,74 @@
<varlistentry>
<term><group choice='plain'>
- <arg choice='plain'><option>-e</option></arg>
- <arg choice='plain'><option>--escape</option></arg>
+ <arg choice='plain'><option>-h</option></arg>
+ <arg choice='plain'><option>--help</option></arg>
+ </group></term>
+
+ <listitem>
+ <para>Print help information.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><group choice='plain'>
+ <arg choice='plain'><option>-m</option></arg>
+ <arg choice='plain'><option>--mode</option></arg>
<group choice='req'>
- <arg choice='plain'>yes</arg>
- <arg choice='plain'>no</arg>
+ <arg choice='plain'>tabular</arg>
+ <arg choice='plain'>multiline</arg>
</group>
</group></term>
<listitem>
- <para>Whether to escape <literal>:</literal> and <literal>\</literal> characters in terse tabular mode. The
- escape character is <literal>\</literal>.</para>
+ <para>Switch between tabular and multiline output:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><arg choice='plain'>tabular</arg></term>
+ <listitem>
+ <para>Output is a table where each line describes a single entry.
+ Columns define particular properties of the entry.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><arg choice='plain'>multiline</arg></term>
+ <listitem>
+ <para>Each entry comprises multiple lines, each property on its
+ own line. The values are prefixed with the property name.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>If omitted, default is <literal>tabular</literal> for most commands.
+ For the commands producing more structured information, that cannot be
+ displayed on a single line, default is <literal>multiline</literal>.
+ Currently, they are:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><literal>nmcli connection show <replaceable>ID</replaceable></literal></para>
+ </listitem>
+
+ <listitem>
+ <para><literal>nmcli device show</literal></para>
+ </listitem>
+ </itemizedlist>
- <para>If omitted, default is <literal>yes</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><group choice='plain'>
- <arg choice='plain'><option>-a</option></arg>
- <arg choice='plain'><option>--ask</option></arg>
+ <arg choice='plain'><option>-p</option></arg>
+ <arg choice='plain'><option>--pretty</option></arg>
</group></term>
<listitem>
- <para>When using this option <command>nmcli</command> will stop and ask for any
- missing required arguments, so do not use this option for non-interactive
- purposes like scripts. This option controls, for example, whether you will be
- prompted for a password if it is required for connecting to a network.</para>
+ <para>Output is pretty. This causes <command>nmcli</command> to produce easily
+ readable outputs for humans, i.e. values are aligned, headers are printed,
+ etc.</para>
</listitem>
</varlistentry>
@@ -283,37 +299,13 @@
<varlistentry>
<term><group choice='plain'>
- <arg choice='plain'><option>-w</option></arg>
- <arg choice='plain'><option>--wait</option></arg></group>
- <arg choice='plain'><replaceable>seconds</replaceable></arg>
- </term>
-
- <listitem>
- <para>This option sets a timeout period for which <command>nmcli</command> will
- wait for NetworkManager to finish operations. It is
- especially useful for commands that may take a longer time to complete, e.g.
- connection activation.</para>
-
- <para>Specifying a value of <literal>0</literal> instructs
- <command>nmcli</command> not to wait but to exit immediately with a status of
- success. The default value depends on the executed command.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><group choice='plain'>
- <arg choice='plain'><option>--complete-args</option></arg>
+ <arg choice='plain'><option>-t</option></arg>
+ <arg choice='plain'><option>--terse</option></arg>
</group></term>
<listitem>
- <para>Instead of conducting the desired action, <command>nmcli</command>
- will list possible completions for the last argument. This is useful to implement
- argument completion in shell.</para>
-
- <para>The <link linkend='exit_status'>exit status</link> will indicate success
- or return a code 65 to indicate the last argument is a file name.</para>
-
- <para>NetworkManager ships with command completion support for GNU Bash.</para>
+ <para>Output is terse. This mode is designed and suitable for computer (script)
+ processing.</para>
</listitem>
</varlistentry>
@@ -330,12 +322,20 @@
<varlistentry>
<term><group choice='plain'>
- <arg choice='plain'><option>-h</option></arg>
- <arg choice='plain'><option>--help</option></arg>
- </group></term>
+ <arg choice='plain'><option>-w</option></arg>
+ <arg choice='plain'><option>--wait</option></arg></group>
+ <arg choice='plain'><replaceable>seconds</replaceable></arg>
+ </term>
<listitem>
- <para>Print help information.</para>
+ <para>This option sets a timeout period for which <command>nmcli</command> will
+ wait for NetworkManager to finish operations. It is
+ especially useful for commands that may take a longer time to complete, e.g.
+ connection activation.</para>
+
+ <para>Specifying a value of <literal>0</literal> instructs
+ <command>nmcli</command> not to wait but to exit immediately with a status of
+ success. The default value depends on the executed command.</para>
</listitem>
</varlistentry>