mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-05 11:20:36 +02:00
cli/device: allow completion of the "wifi" command name
That's the "wifi" string itself. The subcommands need some work.
This commit is contained in:
parent
b8bc57c9d3
commit
9dafcc8b26
1 changed files with 16 additions and 4 deletions
|
|
@ -2501,6 +2501,10 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv)
|
|||
size_t tmpl_len;
|
||||
const char *base_hdr = _("Wi-Fi scan list");
|
||||
|
||||
/* Not (yet?) supported */
|
||||
if (nmc->complete)
|
||||
return nmc->return_value;
|
||||
|
||||
while (argc > 0) {
|
||||
if (strcmp (*argv, "ifname") == 0) {
|
||||
if (next_arg (&argc, &argv) != 0) {
|
||||
|
|
@ -2810,6 +2814,10 @@ do_device_wifi_connect_network (NmCli *nmc, int argc, char **argv)
|
|||
char *ssid_ask = NULL;
|
||||
char *passwd_ask = NULL;
|
||||
|
||||
/* Not (yet?) supported */
|
||||
if (nmc->complete)
|
||||
return nmc->return_value;
|
||||
|
||||
/* Set default timeout waiting for operation completion. */
|
||||
if (nmc->timeout == -1)
|
||||
nmc->timeout = 90;
|
||||
|
|
@ -3261,6 +3269,10 @@ do_device_wifi_hotspot (NmCli *nmc, int argc, char **argv)
|
|||
GBytes *ssid_bytes;
|
||||
GError *error = NULL;
|
||||
|
||||
/* Not (yet?) supported */
|
||||
if (nmc->complete)
|
||||
return nmc->return_value;
|
||||
|
||||
/* Set default timeout waiting for operation completion. */
|
||||
if (nmc->timeout == -1)
|
||||
nmc->timeout = 60;
|
||||
|
|
@ -3475,6 +3487,10 @@ do_device_wifi_rescan (NmCli *nmc, int argc, char **argv)
|
|||
const char *ssid;
|
||||
int i;
|
||||
|
||||
/* Not (yet?) supported */
|
||||
if (nmc->complete)
|
||||
return nmc->return_value;
|
||||
|
||||
ssids = g_ptr_array_new ();
|
||||
|
||||
/* Get the parameters */
|
||||
|
|
@ -3560,10 +3576,6 @@ do_device_wifi (NmCli *nmc, int argc, char **argv)
|
|||
{
|
||||
GError *error = NULL;
|
||||
|
||||
/* Not (yet?) supported */
|
||||
if (nmc->complete)
|
||||
return nmc->return_value;
|
||||
|
||||
if (!nmc_terse_option_check (nmc->print_output, nmc->required_fields, &error)) {
|
||||
g_string_printf (nmc->return_text, _("Error: %s."), error->message);
|
||||
g_error_free (error);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue