Updated Zsh completion customization (markdown)

Philip Sequeira 2016-04-12 01:00:33 -04:00
parent ad3ee60f64
commit 0a101dc86a
1 changed files with 2 additions and 2 deletions

@ -4,11 +4,11 @@ The following code snippets go in `~/.zshrc` unless otherwise specified.
The Zsh completion that ships with mpv currently has a hard-coded list of filename extensions that it completes by default, which does not include all possible files that mpv can play. If you want to add extensions to the list, use something like this (adds .jpg and .png files):
zstyle ':completion:*:complete:mpv:*' file-patterns '*.(#i)(jpg|jpeg|png)(-.) %p:globbed-files *(-/):directories' '*:all-files'
zstyle ':completion:*:*:mpv:*' file-patterns '*.(#i)(jpg|jpeg|png)(-.) %p:globbed-files *(-/):directories' '*:all-files'
If you want to use *only* your specified extensions, ignoring the ones that come with the script, use something like this instead:
zstyle ':completion:*:complete:mpv:*' file-patterns '*.(#i)(jpg|jpeg|png)(-.) *(-/):directories' '*:all-files'
zstyle ':completion:*:*:mpv:*' file-patterns '*.(#i)(jpg|jpeg|png)(-.) *(-/):directories' '*:all-files'
See [Issue #2273](https://github.com/mpv-player/mpv/issues/2273) for a discussion on what the defaults should be. Input is wanted.