From e107d3b59339d1c5b31f8f799bd752ccdf5ea45a Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 31 Oct 2018 13:46:30 +0100 Subject: [PATCH] cli: display double-dash long options in help We support all of these: nmcli -v nmcli -version nmcli --version Change the help output to display the first and last versions for options, since they are the most common ones for command line tools. --- clients/cli/nmcli.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/clients/cli/nmcli.c b/clients/cli/nmcli.c index d28bd519fe..7e8477ccd8 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" - " -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" - " -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" - " -t[erse] terse output\n" - " -v[ersion] show program version\n" - " -w[ait] set timeout waiting for finishing operations\n" + " -a, --ask ask for missing parameters\n" + " -c, --colors auto|yes|no whether to use colors in output\n" + " -e, --escape yes|no escape columns separators in values\n" + " -f, --fields |all|common specify fields to output\n" + " -g, --get-values |all|common shortcut for -m tabular -t -f\n" + " -h, --help print this help\n" + " -m, --mode tabular|multiline output mode\n" + " -o, --overview overview mode\n" + " -p, --pretty pretty output\n" + " -s, --show-secrets allow displaying passwords\n" + " -t, --terse terse output\n" + " -v, --version how program version\n" + " -w, --wait set timeout waiting for finishing operations\n" "\n" "OBJECT\n" " g[eneral] NetworkManager's general status and operations\n"