Mercurial > dotfiles.old
changeset 106:cdff2a5e45b2
Add ag completion
author | zegervdv <zegervdv@me.com> |
---|---|
date | Tue, 12 Aug 2014 09:30:55 +0200 |
parents | ae8d19b22b67 |
children | 508b8bc6ffd5 |
files | .hgsubstate zshrc |
diffstat | 2 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsubstate Mon Aug 11 19:04:02 2014 +0200 +++ b/.hgsubstate Tue Aug 12 09:30:55 2014 +0200 @@ -59,4 +59,4 @@ 242ae46a890f31c0a9db70949cba90abd4e157a2 vim/bundle/vimproc 2c03d82a0e4662adf1e347487d73a9bf4bf6fdac vim/bundle/vimwiki 22fa4e57fa3b0e4c9a83de51717b621fe9ca8cd7 vim/bundle/vis -70054a373fe21d41aab17f65a3f40877c2747a2e vimwiki +1dc48015a65282443bfc1c74279b0bbcc2ba3bf2 vimwiki
--- a/zshrc Mon Aug 11 19:04:02 2014 +0200 +++ b/zshrc Tue Aug 12 09:30:55 2014 +0200 @@ -141,9 +141,17 @@ alias tmux='nocorrect tmux' alias mvim="reattach-to-user-namespace mvim" alias vim="reattach-to-user-namespace vim" -alias ag="ag --color" +# alias ag="ag --color" alias dot="cd ~/.dotfiles" +# ag tab complete +_ag() { + if (( CURRENT == 2 )); then + compadd $(cut -f 1 .git/tags tmp/tags 2>/dev/null | grep -v '!_TAG') + fi +} + +compdef _ag ag compctl -g '~/.teamocil/*(:t:r)' teamocil [[ -f ~/.zshrc.local ]] && source ~/.zshrc.local