mirror of
https://git.proxmox.com/git/fwupd
synced 2025-06-12 12:26:46 +00:00
41 lines
569 B
Plaintext
41 lines
569 B
Plaintext
_fwupdagent_cmd_list=(
|
|
'get-devices'
|
|
'get-updates'
|
|
'get-upgrades'
|
|
'security'
|
|
)
|
|
|
|
_fwupdagent_opts=(
|
|
'--verbose'
|
|
)
|
|
|
|
_show_modifiers()
|
|
{
|
|
COMPREPLY+=( $(compgen -W '${_fwupdagent_opts[@]}' -- "$cur") )
|
|
}
|
|
|
|
_fwupdagent()
|
|
{
|
|
local cur prev command arg args
|
|
COMPREPLY=()
|
|
_get_comp_words_by_ref cur prev
|
|
_get_first_arg
|
|
_count_args
|
|
|
|
case $arg in
|
|
*)
|
|
#find first command
|
|
if [[ "$args" = "1" ]]; then
|
|
COMPREPLY=( $(compgen -W '${_fwupdagent_cmd_list[@]}' -- "$cur") )
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
#modifiers
|
|
_show_modifiers
|
|
|
|
return 0
|
|
}
|
|
|
|
complete -F _fwupdagent fwupdagent
|