mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 22:30:11 +01:00
cli: remove spurious device names from output
When running one of: nmcli device wifi list ifname wlan0 nmcli device wifi connect ... ifname wlan0 nmcli wrongly adds the device name to the output. Do the completion only when requested. Fixes:8679793f6bFixes:1a0dfd31c4
This commit is contained in:
parent
17e7054d73
commit
d2b4332b36
1 changed files with 4 additions and 2 deletions
|
|
@ -2625,7 +2625,8 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv)
|
|||
return NMC_RESULT_ERROR_USER_INPUT;
|
||||
}
|
||||
ifname = *argv;
|
||||
complete_device (devices, ifname, TRUE);
|
||||
if (argc == 1 && nmc->complete)
|
||||
complete_device (devices, ifname, TRUE);
|
||||
} else if (strcmp (*argv, "bssid") == 0 || strcmp (*argv, "hwaddr") == 0) {
|
||||
/* hwaddr is deprecated and will be removed later */
|
||||
argc--;
|
||||
|
|
@ -2878,7 +2879,8 @@ do_device_wifi_connect_network (NmCli *nmc, int argc, char **argv)
|
|||
goto finish;
|
||||
}
|
||||
ifname = *argv;
|
||||
complete_device (devices, ifname, TRUE);
|
||||
if (argc == 1 && nmc->complete)
|
||||
complete_device (devices, ifname, TRUE);
|
||||
} else if (strcmp (*argv, "bssid") == 0) {
|
||||
argc--;
|
||||
argv++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue