zsh: move completion setopts from setopt.zsh into completion.zsh

This commit is contained in:
Thomas Preisner 2017-07-13 20:07:05 +02:00
parent 09816d9035
commit d900f34617
2 changed files with 16 additions and 14 deletions

View file

@ -1,6 +1,21 @@
autoload -U compinit && compinit
# ===== init completion
autoload -Uz compinit && compinit -d ~/.zsh/cache/zcompdump
zmodload -i zsh/complist
# ===== setopts
# allow completion from within a word or phrase
setopt complete_in_word
# always complete and display matches immediately after pressing <Tab>
setopt no_list_ambiguous
# when completing from the middle of a word, move the cursor to the end.
setopt always_to_end
# always show completion menu on successive tab press.
# (needs unsetopt menu_complete to work)
setopt auto_menu
# do not autoselect the first completion entry
unsetopt menu_complete
# ===== completion options
# Enable completion caching, use rehash to clear
zstyle ':completion::complete:*' use-cache on
zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST