From ff88f0b5ce123ddf80e0e4f005086eb8f2d667bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E9=9D=99=E5=8C=97?= Date: Sat, 17 Jan 2015 21:38:01 +0800 Subject: [PATCH] rename _force_rehash() to _force_rehash_pinyin_comp() Fixed #4 --- shell/pinyin-comp.zsh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/shell/pinyin-comp.zsh b/shell/pinyin-comp.zsh index bae1be7..85e2d1a 100644 --- a/shell/pinyin-comp.zsh +++ b/shell/pinyin-comp.zsh @@ -13,13 +13,10 @@ function _pinyin_comp() # Refer to http://zshwiki.org/home/examples/compsys/general # # -if [[ -n `whence -f _force_rehash` ]] -then - _force_rehash() { - (( CURRENT == 1 )) && rehash - return 1 # Because we did not really complete anything - } -fi +_force_rehash_pinyin_comp() { + (( CURRENT == 1 )) && rehash + return 1 # Because we did not really complete anything +} # pinyin-comp is performed as one part of user-expand zstyle ':completion:*' user-expand _pinyin_comp @@ -29,6 +26,6 @@ zstyle ':completion:*:user-expand:*' tag-order expansions # make use-expand perform as last, when needed zstyle ':completion:*' completer \ - _oldlist _expand _force_rehash _complete _match _user_expand + _oldlist _expand _force_rehash_pinyin_comp _complete _match _user_expand # vim:set ft=zsh et: