Skip to content

Instantly share code, notes, and snippets.

@andyjeffries
Created March 30, 2010 08:10
Show Gist options
  • Save andyjeffries/348897 to your computer and use it in GitHub Desktop.
Save andyjeffries/348897 to your computer and use it in GitHub Desktop.
A short textmate wrapper command
#!/usr/bin/env ruby
if ARGV.size == 0
lines = `ls -1 *.tmproj 2>/dev/null`.split("\n")
if lines.size == 1
`open #{lines[0]}`
else
`mate .`
end
else
`mate #{ARGV.map {|e| "\"#{e}\""}.join(" ")}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment