diff options
author | Thomas Haller <thaller@redhat.com> | 2020-11-16 09:59:15 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-11-17 13:43:26 +0100 |
commit | 9a2feb1dc3c341dccb6e75bd6063702d701fd509 (patch) | |
tree | ecb7ae9084d55762431fdb61784257c6b4abf2f2 | |
parent | 23fc22df4a8c9aaa0d2ea3f657424ae06535e09b (diff) | |
download | NetworkManager-9a2feb1dc3c341dccb6e75bd6063702d701fd509.tar.gz |
cli: fix shell completion for connection.type to show "ovs-{dpkg,patch}"
nmcli --complete-args connection add type ''
would not show "ovs-{dpdk,patch}", because the conditions about what
makes a base type are not consistent with what NMSettingConnection's
verify() does.
Fix that.
-rw-r--r-- | clients/common/nm-meta-setting-desc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index 35758b8f3a..aa6fa0dbf0 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -2561,9 +2561,10 @@ static const char *const *_complete_fcn_connection_type(ARGS_COMPLETE_FCN) for (i = 0, j = 0; i < _NM_META_SETTING_TYPE_NUM; i++) { const NMMetaSettingInfoEditor *setting_info = &nm_meta_setting_infos_editor[i]; + GType gtype = setting_info->general->get_setting_gtype(); const char * v; - if (!setting_info->valid_parts) + if (_nm_setting_type_get_base_type_priority(gtype) == NM_SETTING_PRIORITY_INVALID) continue; v = setting_info->alias; |