mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 03:38:09 +02:00
cli/bash-completion: update bash completion for '--show-secrets' option
This commit is contained in:
parent
1a64683802
commit
2a40acc67d
1 changed files with 5 additions and 2 deletions
|
|
@ -170,6 +170,9 @@ _nmcli_compl_OPTIONS()
|
||||||
ask)
|
ask)
|
||||||
_nmcli_array_delete_at words 0
|
_nmcli_array_delete_at words 0
|
||||||
;;
|
;;
|
||||||
|
show-secrets)
|
||||||
|
_nmcli_array_delete_at words 0
|
||||||
|
;;
|
||||||
active)
|
active)
|
||||||
_nmcli_array_delete_at words 0
|
_nmcli_array_delete_at words 0
|
||||||
;;
|
;;
|
||||||
|
|
@ -761,11 +764,11 @@ _nmcli()
|
||||||
case "$command" in
|
case "$command" in
|
||||||
s|sh|sho|show)
|
s|sh|sho|show)
|
||||||
if [[ ${#words[@]} -eq 3 ]]; then
|
if [[ ${#words[@]} -eq 3 ]]; then
|
||||||
_nmcli_compl_COMMAND_nl "${words[2]}" "$(printf "id\nuuid\npath\napath\n%s" "$(_nmcli_con_show NAME)")" active
|
_nmcli_compl_COMMAND_nl "${words[2]}" "$(printf "id\nuuid\npath\napath\n%s" "$(_nmcli_con_show NAME)")" active show-secrets
|
||||||
elif [[ ${#words[@]} -gt 3 ]]; then
|
elif [[ ${#words[@]} -gt 3 ]]; then
|
||||||
_nmcli_array_delete_at words 0 1
|
_nmcli_array_delete_at words 0 1
|
||||||
|
|
||||||
LONG_OPTIONS=(help active)
|
LONG_OPTIONS=(help active show-secrets)
|
||||||
HELP_ONLY_AS_FIRST=1
|
HELP_ONLY_AS_FIRST=1
|
||||||
_nmcli_compl_OPTIONS
|
_nmcli_compl_OPTIONS
|
||||||
i=$?
|
i=$?
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue