comparison zshrc @ 86:3a37086414bd

Improve tab completion
author zegervdv <zegervdv@me.com>
date Sat, 02 Aug 2014 10:56:31 +0200
parents dd76ef1174f1
children afe2d02577c2
comparison
equal deleted inserted replaced
85:8a5464ec3c29 86:3a37086414bd
36 plugins=(git z textmate sublime ruby history-substring-search brew gitfast osx terminalapp vagrant web-search gitignore brew-cask rake-fast colorize colored-man extract) 36 plugins=(git z textmate sublime ruby history-substring-search brew gitfast osx terminalapp vagrant web-search gitignore brew-cask rake-fast colorize colored-man extract)
37 37
38 source $ZSH/oh-my-zsh.sh 38 source $ZSH/oh-my-zsh.sh
39 39
40 # source $ZSH/plugins/history-substring-search/history-substring-search.zsh 40 # source $ZSH/plugins/history-substring-search/history-substring-search.zsh
41
42 setopt nobeep
43 setopt notify
44 REPORTTIME=5
45 # GRML style completion
46 # activate color-completion
47 zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
48
49 # format on completion
50 zstyle ':completion:*:descriptions' format $'%{\e[0;31m%}completing %B%d%b%{\e[0m%}'
51
52 # automatically complete 'cd -<tab>' and 'cd -<ctrl-d>' with menu
53 # zstyle ':completion:*:*:cd:*:directory-stack' menu yes select
54
55 # insert all expansions for expand completer
56 zstyle ':completion:*:expand:*' tag-order all-expansions
57 zstyle ':completion:*:history-words' list false
58
59 # activate menu
60 zstyle ':completion:*:history-words' menu yes
61
62 # ignore duplicate entries
63 zstyle ':completion:*:history-words' remove-all-dups yes
64 zstyle ':completion:*:history-words' stop yes
65
66 # match uppercase from lowercase
67 zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
68
69 zstyle ':completion:*:matches' group 'yes'
70 zstyle ':completion:*' group-name ''
71 if [[ "$NOMENU" -eq 0 ]] ; then
72 # if there are more than 5 options allow selecting from a menu
73 zstyle ':completion:*' menu select=5
74 else
75 # don't use any menus at all
76 setopt no_auto_menu
77 fi
78
79 zstyle ':completion:*:messages' format '%d'
80 zstyle ':completion:*:options' auto-description '%d'
81
82 # describe options in full
83 zstyle ':completion:*:options' description 'yes'
84 # Provide more processes in completion of programs like killall:
85 zstyle ':completion:*:processes-names' command 'ps c -u ${USER} -o command | uniq'
86
87 # complete manual by their section
88 zstyle ':completion:*:manuals' separate-sections true
89 zstyle ':completion:*:manuals.*' insert-sections true
90 zstyle ':completion:*:man:*' menu yes select
91
92 # Search path for sudo completion
93 zstyle ':completion:*:sudo:*' command-path /usr/local/sbin \
94 /usr/local/bin \
95 /usr/sbin \
96 /usr/bin \
97 /sbin \
98 /bin \
99 /usr/X11R6/bin
100
101 # provide .. as a completion
102 zstyle ':completion:*' special-dirs ..
41 103
42 # Customize to your needs... 104 # Customize to your needs...
43 export PATH=$PATH:/usr/local/opt/ruby/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/usr/local/sbin 105 export PATH=$PATH:/usr/local/opt/ruby/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/usr/local/sbin
44 export PATH="/usr/local/bin:$PATH" 106 export PATH="/usr/local/bin:$PATH"
45 export PATH="$(brew --prefix ruby)/bin:$PATH" 107 export PATH="$(brew --prefix ruby)/bin:$PATH"