mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-28 11:50:35 +01:00
cli: fix completion for nmcli connection import
If we already specified "type" or "file", don't offer it for completion again. $ nmcli connection import type openvpn <TAB> file type
This commit is contained in:
parent
62b939de4e
commit
fea0f4a5ea
1 changed files with 5 additions and 2 deletions
|
|
@ -8888,8 +8888,11 @@ do_connection_import (NmCli *nmc, int argc, char **argv)
|
|||
}
|
||||
|
||||
while (argc > 0) {
|
||||
if (argc == 1 && nmc->complete)
|
||||
nmc_complete_strings (*argv, "type", "file", NULL);
|
||||
if (argc == 1 && nmc->complete) {
|
||||
nmc_complete_strings (*argv,
|
||||
type ? NULL : "type",
|
||||
filename ? NULL : "file");
|
||||
}
|
||||
|
||||
if (strcmp (*argv, "type") == 0) {
|
||||
argc--;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue