From cb049d25006440811ddc93a77f97b63479ef5d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Fri, 27 Nov 2015 23:26:49 +0100 Subject: [PATCH] cli: allow TAB-completion for tun.mode in nmcli editor Fixes: 64c6b124d24c0cd06b2868b4ca6a71f8e78e6c00 --- clients/cli/settings.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clients/cli/settings.c b/clients/cli/settings.c index 19eeaf85b9..bf2cadc707 100644 --- a/clients/cli/settings.c +++ b/clients/cli/settings.c @@ -5325,6 +5325,10 @@ nmc_property_tun_set_mode (NMSetting *setting, const char *prop, return TRUE; } +static const char *tun_valid_modes[] = { "tun", "tap", "unknown", NULL }; + +DEFINE_ALLOWED_VAL_FUNC (nmc_property_tun_allowed_mode, tun_valid_modes) + /*----------------------------------------------------------------------------*/ static inline void @@ -7032,7 +7036,7 @@ nmc_properties_init (void) nmc_property_tun_set_mode, NULL, NULL, - NULL, + nmc_property_tun_allowed_mode, NULL); nmc_add_prop_funcs (GLUE (TUN, OWNER), nmc_property_tun_get_owner,