shell-completions/bash: Add pactl set-default-sink and set-default-source

pactl has these commands, too. Use the same order as the
man page, except the undocumented 'help'. Note that the commands are
sorted alphabetically when completed anyway, though
that can be disabled since Bash 4.4
(https://unix.stackexchange.com/q/215937/111181)

The zsh completions already support set-default-sink and
set-default-source.
This commit is contained in:
Jarno Suni 2020-01-21 13:17:32 +00:00 committed by Tanu Kaskinen
parent b72f295597
commit a6beb3f4bf

View file

@ -116,11 +116,12 @@ _pactl() {
modules samples clients' modules samples clients'
local commands=(stat info list exit upload-sample play-sample remove-sample local commands=(stat info list exit upload-sample play-sample remove-sample
load-module unload-module move-sink-input move-source-output load-module unload-module move-sink-input move-source-output
suspend-sink suspend-source set-card-profile set-sink-port suspend-sink suspend-source set-card-profile set-default-sink
set-source-port set-sink-volume set-source-volume set-sink-port set-default-source set-source-port set-sink-volume
set-sink-input-volume set-source-output-volume set-sink-mute set-source-volume set-sink-input-volume set-source-output-volume
set-source-mute set-sink-input-mute set-source-output-mute set-sink-mute set-source-mute set-sink-input-mute
set-sink-formats set-port-latency-offset subscribe help) set-source-output-mute set-sink-formats set-port-latency-offset
subscribe help)
_init_completion -n = || return _init_completion -n = || return
preprev=${words[$cword-2]} preprev=${words[$cword-2]}