summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2018-08-24 09:52:09 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2018-08-24 10:34:09 +0200
commit7c706473bf1820385a57a2245f952b4a03762f01 (patch)
tree99e0478774359a558c4438d331d1606e744dfa17
parente3a4a454dc8bd165320ec6d8f2a0d423bb6026b4 (diff)
downloadNetworkManager-7c706473bf1820385a57a2245f952b4a03762f01.tar.gz
cli: autocomplete connection type even if it has an alias
Before, we would not autocomplete connection types that have an alias: Connection type: <TAB><TAB> 6lowpan cdma macvlan vlan 802-11-olpc-mesh dummy olpc-mesh vpn 802-11-wireless ethernet ovs-bridge vxlan 802-3-ethernet generic ovs-interface wifi adsl gsm ovs-port wimax bluetooth infiniband pppoe wpan bond ip-tunnel team bridge macsec tun Connection type: 8<TAB> [-> no completion] Don't treat the default connection type (for example, "802-3-ethernet") in a special way and allow it to be autocompleted, because we already display it when the user did not enter any text.
-rw-r--r--clients/common/nm-meta-setting-desc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index 29eb98a775..09f30641fa 100644
--- a/clients/common/nm-meta-setting-desc.c
+++ b/clients/common/nm-meta-setting-desc.c
@@ -2485,11 +2485,9 @@ _complete_fcn_connection_type (ARGS_COMPLETE_FCN)
if (!text || strncmp (text, v, text_len) == 0)
result[j++] = g_strdup (v);
}
- if (!text || !*text || !v) {
- v = setting_info->general->setting_name;
- if (!text || strncmp (text, v, text_len) == 0)
- result[j++] = g_strdup (v);
- }
+ v = setting_info->general->setting_name;
+ if (!text || strncmp (text, v, text_len) == 0)
+ result[j++] = g_strdup (v);
}
if (j)
result[j++] = NULL;