From d76ac490f570ac835dd1f9e8ad54047a4910d9e7 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 31 Oct 2018 13:46:07 +0100 Subject: cli: sort options in man page and program help Options are displayed in a random order, sort them. --- clients/cli/nmcli.c | 16 ++-- man/nmcli.xml | 208 ++++++++++++++++++++++++++-------------------------- 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] |all|common specify fields to output\n" " -g[et-values] |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] 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] 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 @@ - - + + - Output is terse. This mode is designed and suitable for computer (script) - processing. + When using this option nmcli 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. - - + + + + yes + no + auto + - Output is pretty. This causes nmcli to produce easily - readable outputs for humans, i.e. values are aligned, headers are printed, - etc. + This option controls color output (using terminal escape sequences). + yes enables colors, no disables them, + auto only produces colors when standard output is directed + to a terminal. The default value is auto. + The actual colors used are configured as described in + terminal-colors.d5. + Please refer to the section for a + list of color names supported by nmcli. - - - - tabular - multiline - + - Switch between tabular and multiline output: - - - - tabular - - Output is a table where each line describes a single entry. - Columns define particular properties of the entry. - - - - - multiline - - Each entry comprises multiple lines, each property on its - own line. The values are prefixed with the property name. - - - - - If omitted, default is tabular for most commands. - For the commands producing more structured information, that cannot be - displayed on a single line, default is multiline. - Currently, they are: - - - - nmcli connection show ID - + Instead of conducting the desired action, nmcli + will list possible completions for the last argument. This is useful to implement + argument completion in shell. - - nmcli device show - - + The exit status will indicate success + or return a code 65 to indicate the last argument is a file name. + NetworkManager ships with command completion support for GNU Bash. - - + + yes no - auto - This option controls color output (using terminal escape sequences). - yes enables colors, no disables them, - auto only produces colors when standard output is directed - to a terminal. The default value is auto. - The actual colors used are configured as described in - terminal-colors.d5. - Please refer to the section for a - list of color names supported by nmcli. + Whether to escape : and \ characters in terse tabular mode. The + escape character is \. + + If omitted, default is yes. @@ -238,33 +213,74 @@ - - + + + + + + Print help information. + + + + + + + - yes - no + tabular + multiline - Whether to escape : and \ characters in terse tabular mode. The - escape character is \. + Switch between tabular and multiline output: + + + + tabular + + Output is a table where each line describes a single entry. + Columns define particular properties of the entry. + + + + + multiline + + Each entry comprises multiple lines, each property on its + own line. The values are prefixed with the property name. + + + + + If omitted, default is tabular for most commands. + For the commands producing more structured information, that cannot be + displayed on a single line, default is multiline. + Currently, they are: + + + + nmcli connection show ID + + + + nmcli device show + + - If omitted, default is yes. - - + + - When using this option nmcli 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. + Output is pretty. This causes nmcli to produce easily + readable outputs for humans, i.e. values are aligned, headers are printed, + etc. @@ -283,37 +299,13 @@ - - - seconds - - - - This option sets a timeout period for which nmcli 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. - - Specifying a value of 0 instructs - nmcli not to wait but to exit immediately with a status of - success. The default value depends on the executed command. - - - - - - + + - Instead of conducting the desired action, nmcli - will list possible completions for the last argument. This is useful to implement - argument completion in shell. - - The exit status will indicate success - or return a code 65 to indicate the last argument is a file name. - - NetworkManager ships with command completion support for GNU Bash. + Output is terse. This mode is designed and suitable for computer (script) + processing. @@ -330,12 +322,20 @@ - - - + + + seconds + - Print help information. + This option sets a timeout period for which nmcli 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. + + Specifying a value of 0 instructs + nmcli not to wait but to exit immediately with a status of + success. The default value depends on the executed command. -- cgit v1.2.1