diff options
author | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2014-05-24 13:05:52 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2014-05-25 10:52:05 +0300 |
commit | 7978b9c24271f605b8072db7b839397370d96f04 (patch) | |
tree | 23096f08d4d81d632b9b7f8e96ea6b80636fc7e5 | |
parent | be101476113b18fbdb32d9905ec8fe88b9d34df1 (diff) |
shell-completion: Add completion for parec
Thanks to Damir Jelić for fixes in the zsh completion.
-rw-r--r-- | shell-completion/pulseaudio-bash-completion.sh | 2 | ||||
-rw-r--r-- | shell-completion/pulseaudio-zsh-completion.zsh | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/shell-completion/pulseaudio-bash-completion.sh b/shell-completion/pulseaudio-bash-completion.sh index 43f4a2c39..7775b0829 100644 --- a/shell-completion/pulseaudio-bash-completion.sh +++ b/shell-completion/pulseaudio-bash-completion.sh @@ -492,7 +492,7 @@ _pacat () { ;; esac } -complete -F _pacat pacat paplay parecord +complete -F _pacat pacat paplay parec parecord _pulseaudio() { diff --git a/shell-completion/pulseaudio-zsh-completion.zsh b/shell-completion/pulseaudio-zsh-completion.zsh index abc443a41..c503f2ca4 100644 --- a/shell-completion/pulseaudio-zsh-completion.zsh +++ b/shell-completion/pulseaudio-zsh-completion.zsh @@ -1,4 +1,4 @@ -#compdef pulseaudio pactl pacmd pacat paplay parecord padsp pasuspender +#compdef pulseaudio pactl pacmd pacat paplay parec parecord padsp pasuspender _devices() { local -a _device_list @@ -23,14 +23,14 @@ _devices() { move-source-output) cmd=('sources');; esac - elif [[ $service == (pacat|paplay|parecord) ]]; then + elif [[ $service == (pacat|paplay|parec|parecord) ]]; then case $words[$((CURRENT))] in --device=*) if [[ $words == *(--playback|-p)[[:space:]]* || $service == paplay ]]; then cmd=('sinks') elif [[ $words == *(--record|-r)[[:space:]]* || - $service == parecord ]]; then + $service == (parec|parecord) ]]; then cmd=('sources') else cmd=('sinks' 'sources') @@ -45,7 +45,7 @@ _devices() { $service == paplay ]]; then cmd=('sinks') elif [[ $words == *(--record|-r)[[:space:]]* || - $service == parecord ]]; then + $service == (parec|parecord) ]]; then cmd=('sources') else cmd=('sinks' 'sources') @@ -541,6 +541,7 @@ _pulseaudio() { pacmd) _pacmd_completion;; pacat) _pacat_completion;; paplay)_pacat_completion;; + parec) _pacat_completion;; parecord)_pacat_completion;; padsp) _padsp_completion;; pasuspender) _pasuspender_completion;; |