summaryrefslogtreecommitdiff
path: root/clients/cli/settings.c
diff options
context:
space:
mode:
authorJiří Klimeš <blueowl@centrum.cz>2017-01-17 10:18:00 +0100
committerThomas Haller <thaller@redhat.com>2017-01-17 14:27:31 +0100
commit6397ce1fac35133f7617369e0acf595a90daf258 (patch)
tree14ed0907d096ccf8f567f127c03806e93c934dc3 /clients/cli/settings.c
parent1abee2e0d50c9ae8957251ae20b82f4bb4c8a416 (diff)
downloadNetworkManager-6397ce1fac35133f7617369e0acf595a90daf258.tar.gz
cli: enable TAB-completion for proxy properties in interactive editor
Diffstat (limited to 'clients/cli/settings.c')
-rw-r--r--clients/cli/settings.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/clients/cli/settings.c b/clients/cli/settings.c
index 5b5822610b..40cf9754ad 100644
--- a/clients/cli/settings.c
+++ b/clients/cli/settings.c
@@ -2354,6 +2354,18 @@ nmc_property_proxy_set_method (NMSetting *setting, const char *prop,
return TRUE;
}
+static const char **
+nmc_property_proxy_allowed_method (NMSetting *setting, const char *prop)
+{
+ static const char **words = NULL;
+
+ if (!words)
+ words = nm_utils_enum_get_values (nm_setting_proxy_method_get_type(),
+ NM_SETTING_PROXY_METHOD_NONE,
+ G_MAXINT);
+ return words;
+}
+
static gboolean
nmc_property_proxy_set_pac_script (NMSetting *setting, const char *prop,
const char *val, GError **error)
@@ -8155,7 +8167,7 @@ nmc_properties_init (void)
nmc_property_proxy_set_method,
NULL,
NULL,
- NULL,
+ nmc_property_proxy_allowed_method,
NULL);
nmc_add_prop_funcs (GLUE (PROXY, BROWSER_ONLY),
nmc_property_proxy_get_browser_only,