aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/edit.rb
diff options
context:
space:
mode:
authorMisty De Meo2012-09-10 12:28:00 -0500
committerMisty De Meo2012-09-13 09:39:33 -0500
commit5ce864176a34215b0991ed30b93732b830dced66 (patch)
tree4e534e78ca7b80c3a5d862d1f3bd7d8a31b2ce2d /Library/Homebrew/cmd/edit.rb
parente4d6de0abca5fe406fa8029baa31cc138cf9cbb0 (diff)
downloadbrew-5ce864176a34215b0991ed30b93732b830dced66.tar.bz2
edit: create project view with subl, too
Sublime Text's subl tool supports lovely project views just the same as TextMate. Since I use Sublime, I want good support from `brew edit` too. :P
Diffstat (limited to 'Library/Homebrew/cmd/edit.rb')
-rw-r--r--Library/Homebrew/cmd/edit.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/edit.rb b/Library/Homebrew/cmd/edit.rb
index 27dd4b026..34440024c 100644
--- a/Library/Homebrew/cmd/edit.rb
+++ b/Library/Homebrew/cmd/edit.rb
@@ -13,9 +13,10 @@ module Homebrew extend self
# If no brews are listed, open the project root in an editor.
if ARGV.named.empty?
editor = File.basename which_editor
- if editor == "mate"
- # If the user is using TextMate, give a nice project view instead.
- exec 'mate', HOMEBREW_REPOSITORY+"bin/brew",
+ if editor == "mate" or editor == "subl"
+ # If the user is using TextMate or Sublime Text,
+ # give a nice project view instead.
+ exec editor, HOMEBREW_REPOSITORY+"bin/brew",
HOMEBREW_REPOSITORY+'README.md',
HOMEBREW_REPOSITORY+".gitignore",
*library_folders