# HG changeset patch # User zegervdv # Date 1407828655 -7200 # Node ID cdff2a5e45b25023ca7dc4456384e6f04fd378be # Parent ae8d19b22b67597e6db9ac233bd651575c70fc1d Add ag completion diff -r ae8d19b22b67 -r cdff2a5e45b2 .hgsubstate --- 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 diff -r ae8d19b22b67 -r cdff2a5e45b2 zshrc --- 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