mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 04:24:32 +00:00
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: 29bb6ae4fe
This commit is contained in:
parent
de9b74452c
commit
6cba687bb3
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue