summary refs log tree commit diff
path: root/src/nmcli/nmcli.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2022-08-16 18:24:19 +0200
committerMichael Biebl <biebl@debian.org>2022-08-16 18:24:19 +0200
commit0018d1f3cf71d680d7b6bceda55a5717244d8b26 (patch)
treea058f1d106d172d3354179437ef034c9355cdf9c /src/nmcli/nmcli.c
parent6accbd3ec0e42d8633bbde4d47ed7bfe854e7e0b (diff)
New upstream version 1.39.90 upstream/1.39.90
Diffstat (limited to 'src/nmcli/nmcli.c')
-rw-r--r--src/nmcli/nmcli.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nmcli/nmcli.c b/src/nmcli/nmcli.c
index 96b8ec4a..bc37a7f0 100644
--- a/src/nmcli/nmcli.c
+++ b/src/nmcli/nmcli.c
@@ -726,7 +726,7 @@ process_command_line(NmCli *nmc, int argc, char **argv_orig)
         {"monitor", nmc_command_func_monitor, NULL, TRUE, FALSE},
         {"networking", nmc_command_func_networking, NULL, FALSE, FALSE},
         {"radio", nmc_command_func_radio, NULL, FALSE, FALSE},
-        {"connection", nmc_command_func_connection, NULL, FALSE, FALSE},
+        {"connection", nmc_command_func_connection, NULL, FALSE, FALSE, TRUE},
         {"device", nmc_command_func_device, NULL, FALSE, FALSE},
         {"agent", nmc_command_func_agent, NULL, FALSE, FALSE},
         {NULL, nmc_command_func_overview, usage, TRUE, TRUE},
@@ -761,15 +761,16 @@ process_command_line(NmCli *nmc, int argc, char **argv_orig)
 
         if (argc == 1 && nmc->complete) {
             nmc_complete_strings(argv[0],
+                                 "--overview",
+                                 "--offline",
                                  "--terse",
                                  "--pretty",
                                  "--mode",
-                                 "--overview",
                                  "--colors",
                                  "--escape",
                                  "--fields",
-                                 "--nocheck",
                                  "--get-values",
+                                 "--nocheck",
                                  "--wait",
                                  "--version",
                                  "--help");
@@ -783,6 +784,8 @@ process_command_line(NmCli *nmc, int argc, char **argv_orig)
 
         if (matches_arg(nmc, &argc, &argv, "-overview", NULL)) {
             nmc->nmc_config_mutable.overview = TRUE;
+        } else if (matches_arg(nmc, &argc, &argv, "-offline", NULL)) {
+            nmc->offline = TRUE;
         } else if (matches_arg(nmc, &argc, &argv, "-terse", NULL)) {
             if (nmc->nmc_config.print_output == NMC_PRINT_TERSE) {
                 g_string_printf(nmc->return_text,
@@ -1011,6 +1014,8 @@ nmc_cleanup(NmCli *nmc)
 
     nm_clear_g_free(&nmc->palette_buffer);
 
+    nm_clear_pointer(&nmc->offline_connections, g_ptr_array_unref);
+
     nmc_polkit_agent_fini(nmc);
 }