test_gst_inspect_completion --gst-debug-le -- --gst-debug-level
test_gst_inspect_completion --gst-debug-level '' -- 0 1 2 3 4 5
test_gst_inspect_completion --gst-debug-level = -- 0 1 2 3 4 5
+test_gst_inspect_completion --gst-debug-level= -- 0 1 2 3 4 5
+test_gst_inspect_completion --gst-debug-level=4 -- 4
test_gst_inspect_completion coreel -- coreelements
test_gst_inspect_completion fake -- fakesrc fakesink
test_gst_inspect_completion --version --gst-debug-level = 2 fake -- fakesrc fakesink
+test_gst_inspect_completion --gst-debug-level=2 fake -- fakesrc fakesink
test_gst_launch_completion() {
test_gst_launch_completion --gst-debug-le -- --gst-debug-level
test_gst_launch_completion --gst-debug-level '' -- 0 1 2 3 4 5
test_gst_launch_completion --gst-debug-level = -- 0 1 2 3 4 5
+test_gst_launch_completion --gst-debug-level= -- 0 1 2 3 4 5
+test_gst_launch_completion --gst-debug-level=4 -- 4
test_gst_launch_completion fak -- fakesrc fakesink
test_gst_launch_completion --messages fak -- fakesrc fakesink
test_gst_launch_completion --messages --eos-on-shutdown fak -- fakesrc
+test_gst_launch_completion --gst-debug-level = 4 fak -- fakesrc
+test_gst_launch_completion --gst-debug-level=4 fak -- fakesrc
test_gst_launch_completion fakesrc '' -- name= is-live= format= !
test_gst_launch_completion fakesrc is-live -- is-live=
test_gst_launch_completion fakesrc is-live = -- true false
test_gst_launch_completion fakesrc format = -- bytes time buffers percent
+test_gst_launch_completion fakesrc format= -- bytes time buffers percent
+test_gst_launch_completion fakesrc format=by -- bytes
+test_gst_launch_completion fakesrc format= '' -- bytes time buffers percent
+test_gst_launch_completion fakesrc format= by -- bytes
+test_gst_launch_completion fakesrc is-live = true '' -- name= format= !
+test_gst_launch_completion fakesrc is-live = true for -- format=
+test_gst_launch_completion fakesrc is-live=true '' -- name= format= !
+test_gst_launch_completion fakesrc is-live=true for -- format=
+test_gst_launch_completion fakesrc is-live = true format = -- bytes time
+test_gst_launch_completion fakesrc is-live=true format= -- bytes time
test_gst_launch_parse() {
test_gst_launch_parse --messages -- option '' '' ''
test_gst_launch_parse --gst-debug-level '' -- optionval --gst-debug-level '' ''
test_gst_launch_parse --gst-debug-level = -- optionval --gst-debug-level '' ''
+test_gst_launch_parse --gst-debug-level= -- optionval --gst-debug-level '' ''
+test_gst_launch_parse --gst-debug-level=5 -- optionval --gst-debug-level '' ''
test_gst_launch_parse fak -- element '' '' ''
test_gst_launch_parse --messages fak -- element '' '' ''
test_gst_launch_parse --gst-debug-level = 5 fak -- element '' '' ''
test_gst_launch_parse fakesrc '' -- property '' fakesrc ''
test_gst_launch_parse fakesrc is-l -- property '' fakesrc ''
test_gst_launch_parse fakesrc is-live = -- propertyval '' fakesrc is-live
+test_gst_launch_parse fakesrc is-live= -- propertyval '' fakesrc is-live
+test_gst_launch_parse fakesrc is-live=b -- propertyval '' fakesrc is-live
test_gst_launch_parse fakesrc is-live = true form -- property '' 'fakesrc' ''
test_gst_launch_parse fakesrc is-live = true ! -- ! '' '' ''
test_gst_launch_parse fakesrc is-live = true ! fakesi -- element '' '' ''
local cur cword prev words
_gst_init_completion
[[ "$cur" == "=" ]] && cur=
+ [[ "$cur" =~ -.*=*$ ]] && prev="${cur%%=*}" cur="${cur#*=}"
_gst_common_options || return
next="${words[i]}"
# Note that COMP_WORDBREAKS by default includes "=" and ":".
case "$state,$next" in
+ start,-*=*) curtype=optionval option="${next%%=*}" state=start;;
start,-*) curtype=option option="$next" state=option;;
start,) curtype=option-or-element;;
start,*) curtype=element element="$next" state=element;;
option=,*) curtype=optionval state=start;;
element,\!) curtype='!' state='!';;
\!,*) curtype=element element="$next" state=element;;
+ element,*=)
+ curtype=propertyval property="${next%=}" state=property=;;
+ element,*=*)
+ curtype=propertyval property="${next%%=*}" state=element;;
element,*) curtype=property property="$next" state=property;;
property,=) curtype=propertyval state=property=;;
property=,*) curtype=propertyval state=element;;
esac
i=$((i + 1))
done
- [[ "$cur" == "=" ]] && cur=""
+ cur="${cur#*=}"
}
_gst_takes_arg() {