mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-15 04:18:06 +02:00
This is going to make it possible to parse and complete argument lists in one go:
-nmc_complete_strings (*argv, "ifname", "bssid", NULL);
-next_arg (nmc, &argc, &argv, NULL);
-if (strcmp (*argv, "ifname") == 0)
-...
-else if (strcmp (*argv, "bssid") == 0)
-...
+option = next_arg (nmc, &argc, &argv, "ifname", "bssid", NULL)
+switch (option) {
+case 1:
+...
+case 2:
+...
Beautiful.
|
||
|---|---|---|
| .. | ||
| cli | ||
| common | ||
| tests | ||
| tui | ||
| meson.build | ||
| nm-online.c | ||