mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
27 lines
543 B
Text
27 lines
543 B
Text
#
|
|
# Put this in /etc/bash_completion.d/
|
|
#
|
|
|
|
_gst_launch()
|
|
{
|
|
local cur
|
|
|
|
: ${GST_REGISTRY:=~/.gstreamer-0.11/registry.xml}
|
|
: ${GST_COMPLETE:=~/.gstreamer-0.11/complete}
|
|
|
|
if [ ! -f "${GST_REGISTRY}" ] ; then
|
|
return 0
|
|
fi
|
|
|
|
if [ ! -f "${GST_COMPLETE}" \
|
|
-o "${GST_REGISTRY}" -nt "${GST_COMPLETE}" ] ; then
|
|
sed -n 's/^..<name>\(.*\)<\/name>/\1/ p' ${GST_REGISTRY} >${GST_COMPLETE}
|
|
fi
|
|
|
|
cur=${COMP_WORDS[COMP_CWORD]}
|
|
COMPREPLY=( $(grep ^$cur $GST_COMPLETE) )
|
|
|
|
return 0
|
|
}
|
|
complete -F _gst_launch -o default gst-launch
|
|
|