After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740108 - gstreamer tools should support bash autocompletion
gstreamer tools should support bash autocompletion
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-14 08:29 UTC by Julien Isorce
Modified: 2018-11-03 12:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Makefile.am: install the bash-completion script (969 bytes, patch)
2015-01-19 10:24 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
needs-work Details | Review

Description Julien Isorce 2014-11-14 08:29:04 UTC
Examples: 

- gst-launch ... ! avdec_ + tab should suggest the available avdec decoders.
- gst-launch filesrc location=sample + tab should suggest available local  files starting with "sample" in current directory.  (was working on 0.10)
- gst-inspect  matroskad + tab should complete to matroskademux.

It seems it was supported in the past but not maintained or ported at some point. If someone could point those old commits if exist, that would be great.
Comment 1 Tim-Philipp Müller 2014-11-14 11:12:14 UTC
It was ported:
http://cgit.freedesktop.org/gstreamer/gstreamer/log/tools/gstreamer-completion

The file path completion will work if you put a space after the = :)
Comment 2 Tim-Philipp Müller 2014-11-22 16:23:19 UTC
Are you planning to work on this?
Comment 3 Julien Isorce 2014-11-22 18:12:11 UTC
I though it was installed with make install but it is not.

There is 2 way to use it:

*  type,   "source gstreamer/tools/gstreamer-completion"  to load the completion script. (need bash >=3.2)

or

* install bash-completion and cp gstreamer/tools/gstreamer-completion /etc/bash_completion.d/  (bash >= 4.1 ?)


Then gst-launch-1.0 filesrc lo + tab just completes it to location=,  etc ...  completion plugins are there too. So I do not see a missing ability.
So it is working!

Maybe make install should install the script ?
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2015-01-19 10:24:34 UTC
Created attachment 294851 [details] [review]
Makefile.am: install the bash-completion script

Check for /etc/bash_completions.d/ and install.

Fixes #740108
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2015-01-19 10:27:14 UTC
I am not happy with hardcoding /etc as this won't work when $DESTDIR is set. Unfortunately sysconfdir = ${prefix}/etc and that does not seems to be searched by bash. Not sure if we can/should tell people to ./configure --sysconfdir=/etc for this to work.
Comment 6 Olivier Crête 2015-02-21 00:26:52 UTC
Review of attachment 294851 [details] [review]:

::: tools/Makefile.am
@@ +68,3 @@
+install-data-local:
+	@if test -d /etc/bash_completion.d/ ; then \
+	  $(INSTALL_DATA) gstreamer-completion /etc/bash_completion.d/; \

On Fedora 21 (not sure when this was added), this can be installed in ${prefix}/share/bash-completion/completions
Comment 7 GStreamer system administrator 2018-11-03 12:24:06 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/80.