completion: Try to avoid parsing summary

In GES, the summary refers to options that are only available when built
against gst-valdiate. Those where picked by our regex. This patch add a
initial grep to try and filter-out as best as possible the content to
which we will extract the command list.
This commit is contained in:
Nicolas Dufresne 2017-04-04 16:28:45 -04:00
parent 35c4428083
commit 776e487737

View file

@ -37,7 +37,7 @@ ___gst_plugin_load () { _gst_mandatory_argument; }
_gst_all_arguments ()
{
COMPREPLY=( $(compgen -W "$($1 --help-all | grep -oh '[[:graph:]]*--[[:graph:]]*\|-[[:alpha:]],' | cut -d'=' -f1 | cut -d',' -f1)" -- $cur) )
COMPREPLY=( $(compgen -W "$($1 --help-all | grep "^ -" | grep -oh '[[:graph:]]*--[[:graph:]]*\|-[[:alpha:]],' | cut -d'=' -f1 | cut -d',' -f1)" -- $cur) )
}
_gst_mandatory_argument ()