zsh completion: fix handling of aliases that are listed without --

Pretty sure they used to all have --, but I guess it was changed at some
point. More incentive to do this completion stuff in a more structured
way.
This commit is contained in:
Philip Sequeira 2019-12-14 14:37:36 -05:00 committed by wm4
parent 0198bc13a1
commit a6cb92c74a
1 changed files with 2 additions and 2 deletions

View File

@ -72,10 +72,10 @@ function generate_arguments {
_mpv_completion_arguments+="$name"
elif [[ $desc =~ $'^alias for --([^ \t]+)' ]]; then
elif [[ $desc =~ $'^alias for (--)?([^ \t]+)' ]]; then
# Save this for later; we might not have parsed the target option yet
option_aliases+="$name $match[1]"
option_aliases+="$name $match[2]"
else