cli: fix connection type completion on connection add

System Internals / NetworkManager - Beniamino Galvani [redhat.com] - 27 August 2018 13:14 EDT

The array returned by the completion function follows a special convention. If the first element is set, it is used as the completion. Otherwise, the remaining entries are the possible completions.

_meta_abstract_complete() just returned an array of matching words and so the first element was always used as completion. Instead, we must use rl_completion_matches() to generate the array passing a generator function.

https://bugzilla.redhat.com/show_bug.cgi?id=1588952

166937711 cli: fix connection type completion on connection add
clients/cli/connections.c | 33 ++++++++++++++++++++++++++-------
1 file changed, 26 insertions(+), 7 deletions(-)

Upstream: cgit.freedesktop.org


  • Share