GNOME Bugzilla – Bug 740108
gstreamer tools should support bash autocompletion
Last modified: 2018-11-03 12:24:06 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.
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 = :)
Are you planning to work on this?
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 ?
Created attachment 294851 [details] [review] Makefile.am: install the bash-completion script Check for /etc/bash_completions.d/ and install. Fixes #740108
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.
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
-- 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.