Before, whereever a connection id is accepted, the completion only
offered 'id', 'uuid', 'path', etc. With this change, it will additionally
suggest the id of existing connections.
https://bugzilla.redhat.com/show_bug.cgi?id=997997
Signed-off-by: Thomas Haller <thaller@redhat.com>
To support optimal completion, more context must be considered.
Especially the OPTIONS, which must appear before the OBJECT.
Modify bash completion to try parsing first the options.
Before, whenever you had options, completion did not work
anymore (because the object was expected as first argument).
Moreover, options were also suggested after specifying the
object. This is now mitigated by parsing the command line
in two steps.
Signed-off-by: Thomas Haller <thaller@redhat.com>
Also sub commands can be abbreviated. Add some more aliases to the bash
completion.
Also fix the option 'nmcli radio mobile' which is called 'wwan'.
Signed-off-by: Thomas Haller <thaller@redhat.com>
nmcli accepts abbreviated versions of object names, e.g. 'con'
instead of 'connection'. Adjust bash completion to also support
this.
Signed-off-by: Thomas Haller <thaller@redhat.com>