# # 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}' }