diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2015-11-27 23:26:49 +0100 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2015-11-28 19:48:02 +0100 |
commit | cb049d25006440811ddc93a77f97b63479ef5d11 (patch) | |
tree | d1087c6920688d8d96ef122c031c63157aab2680 | |
parent | d374352b992dfa385aa6d959a434ec6a1cbbfdb4 (diff) | |
download | NetworkManager-cb049d25006440811ddc93a77f97b63479ef5d11.tar.gz |
cli: allow TAB-completion for tun.mode in nmcli editor
Fixes: 64c6b124d24c0cd06b2868b4ca6a71f8e78e6c00
-rw-r--r-- | clients/cli/settings.c | 6 |
1 files changed, 5 insertions, 1 deletions
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, |