Summary: |
shell-completion: pacat device completion doesn't work properly with Bash |
Product: |
PulseAudio
|
Reporter: |
Tanu Kaskinen <tanuk> |
Component: |
tools | Assignee: |
pulseaudio-bugs |
Status: |
RESOLVED
FIXED
|
QA Contact: |
pulseaudio-bugs |
Severity: |
normal
|
|
|
Priority: |
medium
|
CC: |
lennart, poljar
|
Version: |
unspecified | |
|
Hardware: |
Other | |
|
OS: |
All | |
|
Whiteboard: |
|
i915 platform:
|
|
i915 features:
|
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
The Bash shell completion for pacat --device somehow combines the names of sinks and their monitor sources, resulting in mess like the following: > pacat --device=alsa_<TAB> alsa_input.pci-0000_00_1b.0.analog-stereo alsa_output.pci-0000_00_1b.0.analog-stereoalsa_output.pci-0000_00_1b.0.analog-stereo.monitor Note the concatenated string containing a sink name and the sink's monitor source name. Here's a snippet from _pacat(): _pacat () { ... case $cur in ... --device=*) cur=${cur#*=} comps=$(__sinks) comps+=$(__sources) COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur")) ;; The bug is probably in the _pacat() function, because the __sinks() and __sources() functions seem good. I suspect the COMPREPLY line is incorrect, but I don't know in what way.