nmcli: fix bash completion for fields
Summary
The code handling options with supposes, that options are split by =
, which is not the case. This fixes the following:
nmcli -f ipv4.ad\t\t
nmcli -f ipv4.ad=ipv4.addresses
nmcli --field ipv4.ad\t\t
nmcli --field ipv4.ad=ipv4.addresses
Using options with values separated with =
remains broken, but this change doesn't affect it:
nmcli --field=ipv4.ad\t\t
nmcli --field=ipv4.ad
Also, man
and usage
uses --color auto|yes|no
, not --color=auto|yes|no
. So, this fix should be sufficient.
Purpose
Bug report: https://bugzilla.redhat.com/show_bug.cgi?id=2115827
Checklist
Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:
-
the subject for all commits is concise and explicative -
the message for all commits explains the reason for the change -
the source is properly formatted -
any relevant documentation is up to date -
you have added unit tests if applicable