mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 14:20:16 +01:00
cli: fix bash completion for nmcli connection modify
Only complete the setting name if it is at the very first position after the connection. e.g. complete the settings name in the case $ nmcli connection modify em1 connec<TAB> but not at $ nmcli connection modify em1 connection.autoconnect <TAB> Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
ba96409f72
commit
623f8a2be1
1 changed files with 3 additions and 1 deletions
|
|
@ -822,7 +822,9 @@ _nmcli()
|
|||
words=("${words[@]:2}")
|
||||
OPTIONS=(id uuid path apath)
|
||||
_nmcli_complete_COMMAND_CONNECTION && return 0
|
||||
_nmcli_list_nl "$(nmcli connection show configured "${COMMAND_CONNECTION_TYPE:-id}" "$COMMAND_CONNECTION_ID" 2>/dev/null | sed -n 's/^\([^:]\+\):.*/\1/p')"
|
||||
if [[ ${#words[@]} -le 1 ]]; then
|
||||
_nmcli_list_nl "$(nmcli connection show configured "${COMMAND_CONNECTION_TYPE:-id}" "$COMMAND_CONNECTION_ID" 2>/dev/null | sed -n 's/^\([^:]\+\):.*/\1/p')"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
de|del|dele|delet|delete)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue