diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2016-06-24 19:03:36 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2016-06-29 20:49:34 +0200 |
commit | 9dafcc8b268213d477b5776ab41d87543affa795 (patch) | |
tree | 15f6a494d13e3c0ca7f7ccff7b92279891644595 | |
parent | b8bc57c9d395e755d3860b148b60171d80254a37 (diff) | |
download | NetworkManager-lr/completion.tar.gz |
cli/device: allow completion of the "wifi" command namelr/completion
That's the "wifi" string itself. The subcommands need some work.
-rw-r--r-- | clients/cli/devices.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/clients/cli/devices.c b/clients/cli/devices.c index 00d12180f9..6ca5f9b2b3 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -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); |