shell-completion: Add completion for parec
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Sat, 24 May 2014 10:05:52 +0000 (13:05 +0300)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Sun, 25 May 2014 07:52:05 +0000 (10:52 +0300)
Thanks to Damir Jelić for fixes in the zsh completion.

shell-completion/pulseaudio-bash-completion.sh
shell-completion/pulseaudio-zsh-completion.zsh

index 43f4a2c39b8339f15c2f9217ce0e51832965c68a..7775b0829598f54b8e9c23f8f4a0970803fad898 100644 (file)
@@ -492,7 +492,7 @@ _pacat () {
             ;;
     esac
 }
-complete -F _pacat pacat paplay parecord
+complete -F _pacat pacat paplay parec parecord
 
 _pulseaudio()
 {
index abc443a4198fbb75616edadf90d818db0caad7ae..c503f2ca48a739a16dba4fadbf0a4d5fd8f6c26f 100644 (file)
@@ -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;;