mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 13:08:49 +00:00
271c707c45
The original registry was in xml format (~/.gstreamer-*/registry.xml). A binary registry format was added in 2007 (commitebf0c9d3
) and made the default in 2008 (commit3f39fd7e
). In 0.10 you could still choose at "configure" time to use the xml registry instead; in 1.0 the binary registry is your only choice. This change to gstreamer-completion should work with either format because it parses the output of "gst-inspect" instead of reading the registry file directly. Note that _gst_launch no longer needs an explicit "return 0" because, unlike the previous grep command, compgen always returns 0 (unless a genuine error occurs). Just like the previous implementation by David Schleef, this "only completes names of features, but that's 90% of what I want it for."
13 lines
309 B
Text
13 lines
309 B
Text
#
|
|
# Put this in /etc/bash_completion.d/
|
|
#
|
|
|
|
_gst_launch() {
|
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
|
COMPREPLY=( $(compgen -W "$(_gst_elements)" -- "$cur") )
|
|
} &&
|
|
complete -F _gst_launch -o default gst-launch-1.0
|
|
|
|
_gst_elements() {
|
|
gst-inspect-1.0 | grep -v 'Total count' | awk -F': +' '{print $2}'
|
|
}
|