gst-launch tab-completion!

David Röthlisberger david at rothlis.net
Fri Dec 21 02:51:48 PST 2012


On 21 Dec 2012, at 09:44, David Röthlisberger wrote:
> On 21 Dec 2012, at 09:30, Stirling Westrup wrote:
>> On Thu, Dec 20, 2012 at 6:54 PM, David Röthlisberger <david at rothlis.net> wrote:
>>> On 20 Dec 2012, at 20:09, Stirling Westrup wrote:
>>>> This is great, but I should point out that under Debian, I have 3
>>>> versions of gst-launch and gst-inspect, because I have both v 0.10 and
>>>> v1.0 installed.
>>>> 
>>>> gst-launch and gst-inspect are symlinked to gst-launch-0.1 and
>>>> gst-inspect-0.1, and I also have gst-launch-1.0 and gst-inspect-1.0.
>>>> This is necessary if one is trying to make a backward compatible
>>>> gstreamer app.  It would be nice if your completions could handle
>>>> this.
>>> 
>>> 
>>> In what way does the completion script not handle your setup?
>>> 
>> 
>> You have two scripts with the same name, one for v1.0, one for v0.1.
>> Installing both means renaming them, and I assumed that would break
>> things. As well, its not clear if these completion scripts will work
>> when I invoke gst-inspect-1.0 rather than just gst-inspect, although I
>> admit I haven't had a chance to check it out yet.
> 
> 
> The script on the 0.10 branch registers to complete for "gst-launch" and
> "gst-launch-0.10". The script on the 1.0 branch registers to complete
> for "gst-launch-1.0". Otherwise, the scripts are identical. So it should
> be safe for you to install both copies of the script to
> /etc/bash_completion.d if you rename one of them.


I was wrong: It isn't entirely safe. Depending on which order the two
scripts are loaded, _all_ the suggested completions will come from
either 1.0 or 0.10 plugins, regardless of the version of gst-launch on
the command line being completed.

I will work on a fix this evening. Thanks for the feedback! :-)



More information about the gstreamer-devel mailing list