gst-launch tab-completion!

David Röthlisberger david at
Sat Dec 22 05:14:31 PST 2012

On 20 Dec 2012, at 14:22, Matt Pekar wrote:
> On 19 Dec 2012, at 19:54, David Röthlisberger wrote:
>> Dear GStreamer devs & users, I have an early Christmas present for you:
>> A bash tab-completion script for gst-inspect and gst-launch.
> This looks like a nice plugin that would be great for handling some of the elements with loads of properties, but I could not get it to work (for the gstreamer-0.10 variant):
> bash: /etc/bash_completion.d/gstreamer-completion: line 33: conditional binary operator expected
> bash: /etc/bash_completion.d/gstreamer-completion: line 33: syntax error near `curtype'
> bash: /etc/bash_completion.d/gstreamer-completion: line 33: `    if [[ -v curtype && -v option ]]; then  # Called from _gst_launch'
> I'm running Debian squeeze, here are the versions of bash and bash-completion I have:
> i     bash                                                 4.1-3      4.1-3     
> i     bash-completion                                      1:1.2-3    1:1.2-3

I have pushed some fixes to my bash-completion-0.10 branch:

i.e. the file to install is

After I receive feedback from Matt & Stirling & any others, I will port
the changes to my bash-completion-master branch and update the patches
on the ticket (

The script is now fully† compatible with bash 3.2, and doesn't even
require the bash-completion package at all (though the easiest way to
install this script is still to install bash-completion, and then drop
this script into /etc/bash_completion.d).

† The one caveat is that under bash 3, the completions for "property="
insert a space after the "=", so you have to press backspace then tab to
get completions for the property values. This is because bash 3 doesn't
have the "compopt" builtin. The only other solution I can think of
(removing the space character from $IFS and inserting the space manually
into completions that do want to be followed by a space) adds too much
complexity to the code, IMO.


More information about the gstreamer-devel mailing list