completion.zsh 754 B

123456789101112131415161718192021222324252627
  1. setopt noautomenu
  2. setopt COMPLETE_IN_WORD
  3. setopt ALWAYS_TO_END
  4. unsetopt flowcontrol
  5. WORDCHARS=''
  6. autoload -U compinit
  7. compinit
  8. zmodload -i zsh/complist
  9. zstyle ':completion:*' list-colors ''
  10. zstyle ':completion:*' hosts $( sed 's/[, ].*$//' $HOME/.ssh/known_hosts )
  11. unsetopt MENU_COMPLETE
  12. setopt AUTO_MENU
  13. bindkey -M menuselect '^o' accept-and-infer-next-history
  14. zstyle ':completion:*:*:*:*:*' menu yes select
  15. # zstyle ':completion:*:*:*:*:processes' force-list always
  16. zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
  17. zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w"
  18. zstyle ':completion:*:*:(ssh|scp):*:*' hosts `sed 's/^\([^ ,]*\).*$/\1/' ~/.ssh/known_hosts`