Skip to content

Instantly share code, notes, and snippets.

@yoppi
Created May 3, 2013 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoppi/5508053 to your computer and use it in GitHub Desktop.
Save yoppi/5508053 to your computer and use it in GitHub Desktop.
Rubyの標準ライブラリ、gem毎にtagsを生成する
#!/usr/bin/env sh
for version in ~/.rbenv/versions/*
do
# 標準ライブラリの tags を生成
cd $version/lib/ruby/*/
ctags -R --regex-ruby='/^[ \t]*([A-Z_][A-Z0-9_]*)[ \t]*=/\1/C,constant/' **/*.rb
for gem in $version/lib/ruby/gems/*/gems/*
do
# gem毎に tags を生成
cd $gem
ctags -R --regex-ruby='/^[ \t]*([A-Z_][A-Z0-9_]*)[ \t]*=/\1/C,constant/' **/*.rb
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment