]> code.delx.au - pulseaudio/commitdiff
bash-completion: Don't complete devices in the list commands
authorpoljar (Damir Jelić) <poljarinho@gmail.com>
Fri, 1 Feb 2013 00:57:49 +0000 (01:57 +0100)
committerTanu Kaskinen <tanuk@iki.fi>
Fri, 1 Feb 2013 05:11:15 +0000 (07:11 +0200)
This fixes some wrong completion for the list commands for example:
    pactl list sinks _sink_name_

shell-completion/pulseaudio-bash-completion.sh

index 686178eeac94a00e183fb67bfc39cad1acddb437..a82b10ef6e810a99b6f2da3474d02075d7a8163d 100644 (file)
@@ -174,6 +174,7 @@ _pactl() {
             _known_hosts_real "$cur"
             ;;
     esac
+    [[ $COMPREPLY ]] && return 0
 
     case $prev in
         list) COMPREPLY=($(compgen -W '${list_types[*]}' -- "$cur")) ;;
@@ -234,6 +235,7 @@ _pactl() {
         -s)
             _known_hosts_real "$cur" ;;
     esac
+    [[ $COMPREPLY ]] && return 0
 
     case $cur in
         --server=*)
@@ -316,6 +318,7 @@ _pacmd() {
     esac
 
     case $prev in
+        list-*) ;;
         describe-module|load-module)
             comps=$(__all_modules)
             COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur"))