Skip to content

Instantly share code, notes, and snippets.

@lazyatom
Created June 8, 2012 09:28
Show Gist options
  • Save lazyatom/2894693 to your computer and use it in GitHub Desktop.
Save lazyatom/2894693 to your computer and use it in GitHub Desktop.
Open all files with changes in TextMate
#!/usr/bin/env ruby
git_changes = `git status --porcelain | awk '{print $2}'`
files = []
git_changes.split.each do |file|
if File.directory?(file)
files += Dir["#{file}**/*"]
else
files << file
end
end
files.each { |f| `mate #{f}` }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment