bash-completion: Fix device completion for pacat

The Bash shell completion for pacat --device combines the name of the
last sink and the name of the first source. This patch fixes that by
adding a whitespace separator in the list of devices.

Buglink: https://bugs.freedesktop.org/show_bug.cgi?id=68106
This commit is contained in:
poljar (Damir Jelić) 2013-08-14 16:09:06 +02:00 committed by Tanu Kaskinen
parent 49f93eb2b0
commit bf9b3f0720

View file

@ -452,7 +452,7 @@ _pacat () {
--device=*) --device=*)
cur=${cur#*=} cur=${cur#*=}
comps=$(__sinks) comps=$(__sinks)
comps+=$(__sources) comps+=" "$(__sources)
COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur"))
;; ;;
@ -481,7 +481,7 @@ _pacat () {
-s) _known_hosts_real "$cur" ;; -s) _known_hosts_real "$cur" ;;
-d) -d)
comps=$(__sinks) comps=$(__sinks)
comps+=$(__sources) comps+=" "$(__sources)
COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur"))
;; ;;
esac esac