Mercurial > dotfiles.old
comparison zshrc @ 106:cdff2a5e45b2
Add ag completion
author | zegervdv <zegervdv@me.com> |
---|---|
date | Tue, 12 Aug 2014 09:30:55 +0200 |
parents | afe2d02577c2 |
children | 7e18562d7570 |
comparison
equal
deleted
inserted
replaced
105:ae8d19b22b67 | 106:cdff2a5e45b2 |
---|---|
139 | 139 |
140 # Disable Autocorrections | 140 # Disable Autocorrections |
141 alias tmux='nocorrect tmux' | 141 alias tmux='nocorrect tmux' |
142 alias mvim="reattach-to-user-namespace mvim" | 142 alias mvim="reattach-to-user-namespace mvim" |
143 alias vim="reattach-to-user-namespace vim" | 143 alias vim="reattach-to-user-namespace vim" |
144 alias ag="ag --color" | 144 # alias ag="ag --color" |
145 alias dot="cd ~/.dotfiles" | 145 alias dot="cd ~/.dotfiles" |
146 | 146 |
147 # ag tab complete | |
148 _ag() { | |
149 if (( CURRENT == 2 )); then | |
150 compadd $(cut -f 1 .git/tags tmp/tags 2>/dev/null | grep -v '!_TAG') | |
151 fi | |
152 } | |
153 | |
154 compdef _ag ag | |
147 compctl -g '~/.teamocil/*(:t:r)' teamocil | 155 compctl -g '~/.teamocil/*(:t:r)' teamocil |
148 | 156 |
149 [[ -f ~/.zshrc.local ]] && source ~/.zshrc.local | 157 [[ -f ~/.zshrc.local ]] && source ~/.zshrc.local |
150 | 158 |
151 bindkey '\e[A' history-beginning-search-backward | 159 bindkey '\e[A' history-beginning-search-backward |