mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 19:00:11 +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
(cherry picked from commit fea0f4a5ea)
This commit is contained in:
parent
c5a247c4c0
commit
4a137f919b
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