mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-03 23:00:28 +01:00
cli/bash-completion: complete more then one connections for nmcli connection delete
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
4196cc1179
commit
62cf1d85ff
1 changed files with 19 additions and 1 deletions
|
|
@ -956,8 +956,26 @@ _nmcli()
|
|||
_nmcli_compl_COMMAND_nl "${words[2]}" "$(printf "id\nuuid\npath\n%s" "$(_nmcli_con_show NAME)")"
|
||||
elif [[ ${#words[@]} -gt 3 ]]; then
|
||||
words=("${words[@]:2}")
|
||||
|
||||
LONG_OPTIONS=(help)
|
||||
_nmcli_compl_OPTIONS
|
||||
case $? in
|
||||
0)
|
||||
return 0
|
||||
;;
|
||||
1)
|
||||
ARRAY="${LONG_OPTIONS[@]}"
|
||||
if ! _nmcli_array_has_value "help"; then
|
||||
return 0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
OPTIONS=(id uuid path apath)
|
||||
_nmcli_compl_ARGS_CONNECTION
|
||||
while [[ ${#words[@]} -gt 0 ]]; do
|
||||
_nmcli_compl_ARGS_CONNECTION && return 0
|
||||
done
|
||||
_nmcli_list_nl "$(printf "id\nuuid\npath\n%s" "$(_nmcli_con_show NAME)")"
|
||||
fi
|
||||
;;
|
||||
l|lo|loa|load)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue