mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-09 12:00:36 +01:00
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.
This commit is contained in:
parent
1669377110
commit
2f60fdf19e
1 changed files with 3 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue