[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] 2 commits: shell-completion: add new subcommand get-* for bash
PulseAudio Marge Bot (@pulseaudio-merge-bot)
gitlab at gitlab.freedesktop.org
Mon Aug 1 18:37:28 UTC 2022
PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
9f725caf by hashitaku at 2022-08-01T18:34:25+00:00
shell-completion: add new subcommand get-* for bash
Added to shell-completion of bash as there is no completion for the subcommand get-*.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/735>
- - - - -
ffbcf368 by hashitaku at 2022-08-01T18:34:25+00:00
shell-completion: add new subcommand get-* for zsh
Added to shell-completion of zsh as there is no completion for the subcommand get-*.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/735>
- - - - -
2 changed files:
- shell-completion/bash/pactl
- shell-completion/zsh/_pulseaudio
Changes:
=====================================
shell-completion/bash/pactl
=====================================
@@ -116,12 +116,13 @@ _pactl() {
modules samples clients message-handlers'
local commands=(stat info list exit upload-sample play-sample remove-sample
load-module unload-module move-sink-input move-source-output
- suspend-sink suspend-source set-card-profile set-default-sink
- set-sink-port set-default-source set-source-port set-sink-volume
+ suspend-sink suspend-source set-card-profile get-default-sink
+ set-default-sink set-sink-port get-default-source set-default-source
+ set-source-port get-sink-volume set-sink-volume get-source-volume
set-source-volume set-sink-input-volume set-source-output-volume
- set-sink-mute set-source-mute set-sink-input-mute
- set-source-output-mute set-sink-formats set-port-latency-offset
- subscribe send-message help)
+ get-sink-mute set-sink-mute get-source-mute set-source-mute
+ set-sink-input-mute set-source-output-mute set-sink-formats
+ set-port-latency-offset subscribe send-message help)
_init_completion -n = || return
preprev=${words[$cword-2]}
@@ -186,6 +187,8 @@ _pactl() {
remove-sample) ;; # TODO
+ get-default*) ;;
+
load-module)
comps=$(__all_modules)
COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur"))
=====================================
shell-completion/zsh/_pulseaudio
=====================================
@@ -18,10 +18,12 @@ _devices() {
if [[ $service == pactl || $service == pacmd ]]; then
case $words[$((CURRENT - 1))] in
set-sink-input-*) cmd=('sink-inputs');;
+ get-sink-*) cmd=('sinks');;
set-sink-*) cmd=('sinks');;
set-default-sink) cmd=('sinks');;
set-default-source) cmd=('sources');;
set-source-output-*) cmd=('source-outputs');;
+ get-source-*) cmd=('sources');;
set-source-*) cmd=('sources');;
suspend-sink) cmd=('sinks');;
suspend-source) cmd=('sources');;
@@ -257,16 +259,22 @@ _pactl_completion() {
'suspend-sink: suspend or resume a sink'
'suspend-source: suspend or resume a source'
'set-card-profile: set a card profile'
+ 'get-default-sink: get the default sink'
'set-default-sink: set the default sink'
+ 'get-default-source: get the default source'
'set-default-source: set the default source'
'set-sink-port: set the sink port of a sink'
'set-source-port: set the source port of a source'
'set-port-latency-offset: set a latency offset on a port'
+ 'get-sink-volume: get the volume of a sink'
'set-sink-volume: set the volume of a sink'
+ 'get-source-volume: get the volume of a source'
'set-source-volume: set the volume of a source'
'set-sink-input-volume: set the volume of a stream'
'set-source-output-volume: set the volume of a recording stream'
+ 'get-sink-mute: get the mute status of a sink'
'set-sink-mute: mute a sink'
+ 'get-source-mute: get the mute status of a source'
'set-source-mute: mute a source'
'set-sink-input-mute: mute a stream'
'set-source-output-mute: mute a recording stream'
@@ -492,11 +500,15 @@ _pactl_completion() {
set-default-source) if ((CURRENT == 2)); then _devices; fi;;
set-sink-port) _set_sink_port_parameter;;
set-source-port) _set_source_port_parameter;;
+ get-sink-volume) if ((CURRENT == 2)); then _devices; fi;;
set-sink-volume) if ((CURRENT == 2)); then _devices; fi;;
+ get-source-volume) if ((CURRENT == 2)); then _devices; fi;;
set-source-volume) if ((CURRENT == 2)); then _devices; fi;;
set-sink-input-volume) if ((CURRENT == 2)); then _devices; fi;;
set-source-output-volume) if ((CURRENT == 2)); then _devices; fi;;
+ get-sink-mute) if ((CURRENT == 2)); then _devices; fi;;
set-sink-mute) _set_sink_mute_parameter;;
+ get-source-mute) if ((CURRENT == 2)); then _devices; fi;;
set-source-mute) _set_source_mute_parameter;;
set-sink-input-mute) _set_sink_input_mute_parameter;;
set-source-output-mute) _set_source_output_mute_parameter;;
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/dc027d69e886cbd0da1eb2124fd824251e157b18...ffbcf368545f2b244f23dd67130c3eae40f6b6b1
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/dc027d69e886cbd0da1eb2124fd824251e157b18...ffbcf368545f2b244f23dd67130c3eae40f6b6b1
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20220801/a2c9c4cf/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list