diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2018-02-13 10:32:11 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2018-02-13 16:09:16 +0100 |
commit | 6cba687bb3ffc027a7ab03e6019e10f304989d6b (patch) | |
tree | 407c05528ffdf4b02e0f79cbf22c635c06520803 /clients | |
parent | de9b74452ca9e2610850024707d400402cc7c729 (diff) | |
download | NetworkManager-6cba687bb3ffc027a7ab03e6019e10f304989d6b.tar.gz |
cli: fix completion of help sub-command
'help' is completed without considering other alternatives:
# nmcli connection modify h<TAB>
help
After the patch:
# nmcli connection modify h<TAB>
help
home-wifi
Fixes: 29bb6ae4fec37db177418bae9d9462b577d3b2fd
Diffstat (limited to 'clients')
-rw-r--r-- | clients/cli/common.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clients/cli/common.c b/clients/cli/common.c index 3689defeb1..38729a6d08 100644 --- a/clients/cli/common.c +++ b/clients/cli/common.c @@ -1235,9 +1235,8 @@ nmc_do_cmd (NmCli *nmc, const NMCCommand cmds[], const char *cmd, int argc, char /* A valid command was specified. */ if (c->usage && argc == 2 && nmc->complete) nmc_complete_help (*(argv+1)); - if (c->usage && nmc_arg_is_help (*(argv+1))) { - if (!nmc->complete) - c->usage (); + if (!nmc->complete && c->usage && nmc_arg_is_help (*(argv+1))) { + c->usage (); g_simple_async_result_complete_in_idle (simple); g_object_unref (simple); } else { |