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-27 15:14:01 +0200
commit2f60fdf19e2d0e29eedff8cff6574c0499373993 (patch)
tree14e224c33874b005e3506cf21a515ae34aa3a014
parent16693771102e2efafeb06def8b89ee864955b437 (diff)
downloadNetworkManager-2f60fdf19e2d0e29eedff8cff6574c0499373993.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;