diff options
author | Philip Sequeira <phsequei@gmail.com> | 2016-04-07 23:36:27 -0400 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-04-08 10:57:54 +0200 |
commit | 4561649f2d942ae12cdf7ce93d074d75d7268bb5 (patch) | |
tree | e87e8de9e144006bdbdebf3d48029af1a43c22e7 /TOOLS | |
parent | 6325bdf197283e6a6342d229208d58fd1c3e841c (diff) | |
download | mpv-4561649f2d942ae12cdf7ce93d074d75d7268bb5.tar.bz2 mpv-4561649f2d942ae12cdf7ce93d074d75d7268bb5.tar.xz |
TOOLS/zsh.pl: don't complete URLs by default
...unless no files match. Fixes #2892.
To get the old behaviour back, use something like:
zstyle ':completion:*:*:mpv:*' tag-order
Diffstat (limited to 'TOOLS')
-rwxr-xr-x | TOOLS/zsh.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/TOOLS/zsh.pl b/TOOLS/zsh.pl index 6bd2a02d42..5934bd1b4e 100755 --- a/TOOLS/zsh.pl +++ b/TOOLS/zsh.pl @@ -69,11 +69,17 @@ chomp $profile_comp; my $tmpl = <<"EOS"; #compdef mpv -# mpv zsh completion +# For customization, see: +# https://github.com/mpv-player/mpv/wiki/Zsh-completion-customization local curcontext="\$curcontext" state state_descr line typeset -A opt_args +# By default, don't complete URLs unless no files match +local -a tag_order +zstyle -a ":completion:*:*:$service:*" tag-order tag_order || \ + zstyle ":completion:*:*:$service:*" tag-order '!urls' + local rc=1 _arguments -C -S \\ |