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.
This commit is contained in:
parent
9a2cb782b1
commit
c17ff5ad37
1 changed files with 1 additions and 3 deletions
|
@ -1,9 +1,7 @@
|
|||
#compdef ag
|
||||
|
||||
if (( CURRENT == 2 )); then
|
||||
if [[ -a tmp/tags ]]; then
|
||||
compadd $(cut -f 1 tmp/tags | uniq)
|
||||
fi
|
||||
compadd $(cut -f 1 tmp/tags .git/tags 2>/dev/null)
|
||||
else;
|
||||
_files
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue