mirror of https://github.com/mpv-player/mpv
zsh-completion: fix completing --screenshot-avif-opts-*
The list options --screenshot-avif-opts and --vo-image-opts are completed with an extra 8), e.g. --screenshot-avif-opts-add=8), because *= in screenshot-avif-opts=-:Key/value list (default\: usage=allintra,crf=0,cpu-used=8): matches up to cpu-used= instead of instead of up to screenshot-avif-opts=. Fix this by enabling non-greedy matching.
This commit is contained in:
parent
344ce9200d
commit
ce0452fa0d
|
@ -65,7 +65,7 @@ function _mpv_generate_arguments {
|
||||||
_mpv_completion_arguments+="$name"
|
_mpv_completion_arguments+="$name"
|
||||||
else
|
else
|
||||||
# Find the parent option and use that with this option's name
|
# Find the parent option and use that with this option's name
|
||||||
_mpv_completion_arguments+="${_mpv_completion_arguments[(R)${name%-*}=*]/*=/$name=}"
|
_mpv_completion_arguments+="${(S)_mpv_completion_arguments[(R)${name%-*}=*]/*=/$name=}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ $desc == Print* ]]; then
|
elif [[ $desc == Print* ]]; then
|
||||||
|
|
Loading…
Reference in New Issue