gst-launch tab-completion!

David Röthlisberger david at
Wed Dec 19 11:54:06 PST 2012

Dear GStreamer devs & users, I have an early Christmas present for you:
A bash tab-completion script for gst-inspect and gst-launch.

It will complete element names, property names, and (some) property
values as appropriate; it will also complete options like
"--gst-debug-level" and some of those options' values.

This should make gst-launch much more discoverable for new users; hit
<TAB> and you'll see options like "--gst-debug", which might cut down on
a few posts to the mailing list. :-)

This requires bash 4, and the bash-completion package (which you install
with your system's package manager).

I've raised a ticket to (hopefully) get this upstream:

But in the meantime, you can install it by copying
  (for GStreamer 1.0)
  (for GStreamer 0.10)
to /etc/bash_completion.d/
and open a new terminal session (or: source

I will be happy to receive any feedback.

I have some questions for the GStreamer devs:

1. I don't complete all possible caps specifications, like
How can I (programmatically) determine the allowed caps?
I can pull them out with some sed/awk trickery from gst-inspect, but
should I do gst-inspect on the _previous_ element in the pipeline? Or
only caps common to the immediately previous _and_ following elements in
the pipeline? What to do about elements that report caps "ANY"?

2. I complete property values with "enum" and "boolean" types. Are there
any other property types I could handle programmatically? Currently I
default to filename completion if no other completions are generated,
but I suppose I should limit that to properties with names like
"location". I suppose I should also provide caps completion like (1)
above to properties named "caps".

3. How to determine possible completions for "--exclude"? Are these
"status information types" the same as the "category names" given by

4. How to determine possible completions for "--gst-plugin-load":
Is this supposed to take filenames of shared objects? Directories?

5. In addition to the above, I am aware that I need to provide
completions for "--gst-debug" (I can use "--gst-debug-help" to get a
list of category names) and for element names previously given on the
gst-launch command line with "name=xyz".
Is there anything else that completion could offer?

6. There are some unit tests in tests/misc/
Should these be run automatically by "make check"? Would anyone like to
volunteer to do that? :-)

7. Is anybody on this list responsible for the GStreamer packages on a
major distro/OS? Or do you know someone who is? Please get in touch --
I'd like to get the packages installing the bash-completion script


More information about the gstreamer-devel mailing list