Created
November 14, 2011 21:07
-
-
Save edavis10/1365168 to your computer and use it in GitHub Desktop.
Rebuild emacs TAGS on git checkout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# put in .git/hooks/post-checkout | |
# Ruby + JavaScript files - tmp files | |
files = (Dir['**/**.rb'] + Dir['**/**.js']). | |
delete_if {|f| f.match(/tmp\//) }. | |
delete_if {|f| f.match(/vendor\/local/) } | |
system("ctags -f TAGS -e --languages=-all,+ruby,+javascript #{files.join(' ')}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment