mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 06:00:08 +01:00
nmcli: manage autocompletion of "nmcli connection add" when no args are passed
This enables back "help" "--help" "-help" in autocompletion.
This commit is contained in:
parent
1f6d060008
commit
ea9dcd08fa
1 changed files with 6 additions and 2 deletions
|
|
@ -993,8 +993,12 @@ _nmcli()
|
|||
fi
|
||||
;;
|
||||
a|ad|add)
|
||||
_nmcli_array_delete_at words 0 1
|
||||
_nmcli_list_nl "$(nmcli --complete-args connection add "${words[@]}" 2>/dev/null)"
|
||||
if [[ ${#words[@]} -eq 3 ]]; then
|
||||
_nmcli_compl_COMMAND_nl "${words[2]}" "$(nmcli --complete-args connection add "" 2>/dev/null)"
|
||||
else
|
||||
_nmcli_array_delete_at words 0 1
|
||||
_nmcli_list_nl "$(nmcli --complete-args connection add "${words[@]}" 2>/dev/null)"
|
||||
fi
|
||||
;;
|
||||
e|ed|edi|edit)
|
||||
if [[ ${#words[@]} -eq 3 ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue