Skip to content

Instantly share code, notes, and snippets.

@dylanahsmith
Forked from burke/ctags.sh
Last active December 22, 2021 21:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dylanahsmith/2426287 to your computer and use it in GitHub Desktop.
Save dylanahsmith/2426287 to your computer and use it in GitHub Desktop.
bundle-ctags
#!/usr/bin/env ruby
bundle_list_paths = `bundle list --paths`
unless $?.success?
print bundle_list_paths
exit 1
end
gem_paths = bundle_list_paths.split.map do |path|
File.join(path, 'lib')
end.select do |path|
File.directory?(path)
end
exec('ctags', '-R', '--languages=ruby', '.', *gem_paths)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment