Skip to content

Commit

Permalink
rename _force_rehash() to _force_rehash_pinyin_comp()
Browse files Browse the repository at this point in the history
Fixed #4
  • Loading branch information
黎静北 committed Jan 17, 2015
1 parent d15bdf5 commit ff88f0b
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions shell/pinyin-comp.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:

0 comments on commit ff88f0b

Please sign in to comment.