diff options
author | Gravemind <gravemind2a@gmail.com> | 2016-09-22 00:30:35 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2016-09-22 00:43:30 +0200 |
commit | 0d897cca7499a4dd46536acbd999723fd0ca2b5d (patch) | |
tree | 27d3d1d53a82147603fb939e7166c76b448e40fe /lib | |
parent | 904d0ccef9a3508df61f9b0bb784d8b59d5e8bb2 (diff) | |
download | zsh-0d897cca7499a4dd46536acbd999723fd0ca2b5d.tar.gz zsh-0d897cca7499a4dd46536acbd999723fd0ca2b5d.tar.bz2 zsh-0d897cca7499a4dd46536acbd999723fd0ca2b5d.zip |
Fix hyphen and underscore filename completion
This deletes the previous hack that allowed completing files with
the extension: e.g. `abcd.z` to `abcdefg.z`.
It is still possible to use `abcd[TAB].z`, and hyphens or underscores
are very much more important than this other trick.
Source:
https://github.com/robbyrussell/oh-my-zsh/issues/1398#issuecomment-169163149
Signed-off-by: Marc Cornellà <marc.cornella@live.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/completion.zsh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/completion.zsh b/lib/completion.zsh index f5b292471..85c892165 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -12,14 +12,14 @@ zmodload -i zsh/complist ## case-insensitive (all),partial-word and then substring completion if [ "x$CASE_SENSITIVE" = "xtrue" ]; then - zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + zstyle ':completion:*' matcher-list 'r:|=*' 'l:|=* r:|=*' unset CASE_SENSITIVE else if [ "x$HYPHEN_INSENSITIVE" = "xtrue" ]; then - zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*' unset HYPHEN_INSENSITIVE else - zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*' fi fi |