aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Contributions/manpages/brew.1.md11
-rw-r--r--Library/Homebrew/utils.rb7
2 files changed, 16 insertions, 2 deletions
diff --git a/Library/Contributions/manpages/brew.1.md b/Library/Contributions/manpages/brew.1.md
index 0c5ce1eff..1b1939eac 100644
--- a/Library/Contributions/manpages/brew.1.md
+++ b/Library/Contributions/manpages/brew.1.md
@@ -149,6 +149,14 @@ didn't include with OS X.
* HOMEBREW\_DEBUG:
If set, instructs Homebrew to always assume `--debug` when running commands.
+ * HOMEBREW\_EDITOR:
+ If set, Homebrew will use this editor when editing a single formula, or
+ several formulae in the same folder.
+
+ *NOTE*: `brew edit` will open all of Homebrew as discontinuous files and
+ folders. TextMate can handle this correctly in project mode, but many
+ editors will do strange things in this case.
+
* HOMEBREW\_SVN:
When exporting from Subversion, Homebrew will use `HOMEBREW_SVN` if set,
a Homebrew-built Subversion if installed, or the system-provided binary.
@@ -165,7 +173,8 @@ didn't include with OS X.
configurations.)
* HOMEBREW\_USE\_LLVM:
- If set, instructs Homebrew to use the LLVM front-ends to the GCC compilers.
+ If set, instructs Homebrew to use the LLVM front-ends to the GCC compilers.
+
*NOTE*: Not all formulae will build correctly under LLVM.
* HOMEBREW\_VERBOSE:
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