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:
Guido Cella 2024-09-29 22:14:19 +02:00 committed by sfan5
parent 344ce9200d
commit ce0452fa0d
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ function _mpv_generate_arguments {
_mpv_completion_arguments+="$name"
else
# 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
elif [[ $desc == Print* ]]; then