scatterd-dotfiles/zsh/completion/_ag
Joshua Clayton c17ff5ad37 Improve ag tab completion
* Remove unnecessary `uniq`
* Look for tags in tmp/tags or .git/tags
* Send errors to /dev/null if the file(s) do not exist

See http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html for an
explanation behind the reasoning for .git/tags.
2014-08-06 15:51:18 -04:00

7 lines
112 B
Text

#compdef ag
if (( CURRENT == 2 )); then
compadd $(cut -f 1 tmp/tags .git/tags 2>/dev/null)
else;
_files
fi