aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 1fc8a9544..8b3d6fb79 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -140,11 +140,16 @@ def puts_columns items, cols = 4
end
def exec_editor *args
- editor=ENV['EDITOR']
+ editor = ENV['HOMEBREW_EDITOR'] || ENV['EDITOR']
if editor.nil?
if system "/usr/bin/which -s mate"
+ # TextMate
editor='mate'
+ elsif system "/usr/bin/which -s edit"
+ # BBEdit / TextWrangler
+ editor='edit'
else
+ # Default to vim
editor='/usr/bin/vim'
end
end