tools/gstreamer-completion: Allow 1.0 and 0.10 scripts installed simultaneously
authorDavid Rothlisberger <david@rothlis.net>
Wed, 26 Dec 2012 11:54:51 +0000 (11:54 +0000)
committerStefan Sauer <ensonic@users.sf.net>
Mon, 29 Apr 2013 19:17:23 +0000 (21:17 +0200)
commit9f5e9c86320eaa53b6267aa614bb7e60cc3539aa
tree25f45ebcddf38b4aa81b3f36a36336f7dec59544
parent5d6635f9b428fdc574a098d8c1a2c6a94e1e7343
tools/gstreamer-completion: Allow 1.0 and 0.10 scripts installed simultaneously

As long as the scripts' filenames are different, and the _gst_inspect
and _gst_launch functions are named differently, the completion scripts
for GStreamer 1.0 and 0.10 can be installed side-by-side in
/etc/bash_completion.d.

On my 0.10 branch† the completion script is renamed to
"gstreamer-completion-0.10" and the functions are renamed to
"_gst_inspect_0_10" and "_gst_launch_0_10". The remaining helper
functions should remain identical (the command-line interface to
gst-inspect hasn't changed, nor has the format of the gst-launch
pipeline), so it doesn't matter if the 1.0 script overrides the 0.10
script's definitions.

Note that I don't expect there to be another GStreamer 0.10 release, so
the 0.10 completion script will probably never be officially released;
but it is still worthwhile allowing both scripts to be installed
alongside each other, for those who install the 0.10 completion script
manually.

Fixes: #690515

† https://github.com/drothlis/gstreamer/blob/bash-completion-0.10/tools/gstreamer-completion-0.10
tools/gstreamer-completion