summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Sequeira <phsequei@gmail.com>2019-12-14 14:37:36 -0500
committerwm4 <1387750+wm4@users.noreply.github.com>2019-12-15 14:17:00 +0100
commita6cb92c74a802ed2205487f59a324d306b8123da (patch)
tree8ee9d23bf086b5804a3c6bcba56cceafdff06919
parent0198bc13a176973e6b3efa989b8ad318251b8308 (diff)
downloadmpv-a6cb92c74a802ed2205487f59a324d306b8123da.tar.bz2
mpv-a6cb92c74a802ed2205487f59a324d306b8123da.tar.xz
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.
-rw-r--r--etc/_mpv.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/_mpv.zsh b/etc/_mpv.zsh
index 7837d60411..dff2a61629 100644
--- a/etc/_mpv.zsh
+++ b/etc/_mpv.zsh
@@ -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