From 776e48773712d6f46cd341298b75730e01f39d4d Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Tue, 4 Apr 2017 16:28:45 -0400 Subject: [PATCH] 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. --- data/bash-completion/helpers/gst.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/bash-completion/helpers/gst.in b/data/bash-completion/helpers/gst.in index 0acca061d1..42cfb26d98 100644 --- a/data/bash-completion/helpers/gst.in +++ b/data/bash-completion/helpers/gst.in @@ -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 ()