completion.zsh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ## fixme - the load process here seems a bit bizarre
  2. setopt noautomenu
  3. setopt complete_in_word
  4. setopt always_to_end
  5. unsetopt flowcontrol
  6. WORDCHARS=''
  7. autoload -U compinit
  8. compinit
  9. zmodload -i zsh/complist
  10. ## case-insensitive (all),partial-word and then substring completion
  11. zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
  12. zstyle ':completion:*' list-colors ''
  13. zstyle ':completion:*' hosts $( sed 's/[, ].*$//' $HOME/.ssh/known_hosts )
  14. unsetopt MENU_COMPLETE
  15. #setopt AUTO_MENU
  16. # should this be in keybindings?
  17. bindkey -M menuselect '^o' accept-and-infer-next-history
  18. zstyle ':completion:*:*:*:*:*' menu yes select
  19. # zstyle ':completion:*:*:*:*:processes' force-list always
  20. zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
  21. zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w"
  22. zstyle ':completion:*:*:(ssh|scp):*:*' hosts `sed 's/^\([^ ,]*\).*$/\1/' ~/.ssh/known_hosts`
  23. #complete on history
  24. # zstyle ':completion:*:history-words' stop yes
  25. # zstyle ':completion:*:history-words' remove-all-dups yes
  26. # zstyle ':completion:*:history-words' list false
  27. # zstyle ':completion:*:history-words' menu yes