diff --git a/src/tools/shell-completion/wpctl.bash b/src/tools/shell-completion/wpctl.bash index dc3d1783..0a034d3a 100644 --- a/src/tools/shell-completion/wpctl.bash +++ b/src/tools/shell-completion/wpctl.bash @@ -7,7 +7,8 @@ _wpctl_pw_defaults() { _wpctl() { local cur prev words cword local commands="status get-volume inspect set-default set-volume set-mute - set-profile set-route clear-default settings set-log-level" + set-profile set-route clear-default settings set-log-level + list" _init_completion -n = || return @@ -24,6 +25,16 @@ _wpctl() { clear-default) COMPREPLY+=($(compgen -W "0 1 2" -- "$cur")) ;; + + list) + COMPREPLY+=($(compgen -W "audio video" -- "$cur")) + ;; + + audio|video) + if [[ ${COMP_WORDS[COMP_CWORD-2]} == "list" ]]; then + COMPREPLY+=($(compgen -W "devices sinks sources" -- "$cur")) + fi + ;; esac }