summaryrefslogtreecommitdiff
path: root/tools/gstreamer-completion
blob: 5401af006c422c1825ae35f14886b07fece59c35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#
# 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}'
}