mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 21:10:12 +01:00
cli: don't call the nmc_do_cmds() default handler if we're at the end of command completion
This commit is contained in:
parent
8e7c94ed07
commit
81e8575a46
1 changed files with 3 additions and 0 deletions
|
|
@ -1434,6 +1434,9 @@ nmc_do_cmd (NmCli *nmc, const NMCCommand cmds[], const char *cmd, int argc, char
|
|||
{
|
||||
const NMCCommand *c;
|
||||
|
||||
if (argc == 0 && nmc->complete)
|
||||
return nmc->return_value;
|
||||
|
||||
if (argc == 1 && nmc->complete) {
|
||||
for (c = cmds; c->cmd; ++c) {
|
||||
if (!*cmd || matches (cmd, c->cmd) == 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue