提交 0d897cca 编写于 作者: G Gravemind 提交者: Marc Cornellà

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-169163149Signed-off-by: NMarc Cornellà <marc.cornella@live.com>
上级 904d0cce
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册