#!/bin/sh # # Taken from tpope's blog: http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html # set -e dir="`git rev-parse --git-dir`" trap 'rm -f "$dir/$$.tags"' EXIT git ls-files | ctags --tag-relative=yes -L - -f"$dir/$$.tags" mv "$dir/$$.tags" "$dir/tags"