mirror of https://github.com/mpv-player/mpv
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:
parent
0198bc13a1
commit
a6cb92c74a
|
@ -72,10 +72,10 @@ function generate_arguments {
|
||||||
|
|
||||||
_mpv_completion_arguments+="$name"
|
_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
|
# Save this for later; we might not have parsed the target option yet
|
||||||
option_aliases+="$name $match[1]"
|
option_aliases+="$name $match[2]"
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue