diff --git a/Library/Contributions/manpages/brew.1.md b/Library/Contributions/manpages/brew.1.md
index 613365dcfb97fefcf81b504cb2b4aa740ff065e1..2c6c8cb6c399f55745864064c91953433662ce28 100644
--- a/Library/Contributions/manpages/brew.1.md
+++ b/Library/Contributions/manpages/brew.1.md
@@ -193,6 +193,11 @@ Some external commands are shipped with Homebrew, and enabled by default.
     If set, instructs Homebrew to always assume `--debug` when running
     commands.
 
+  * HOMEBREW\_DEBUG\_INSTALL:
+    When a `brew install -d` or `brew install -i` drops into a shell,
+    `HOMEBREW_DEBUG_INSTALL` will be set to the name of the formula being
+    tried.
+
   * HOMEBREW\_EDITOR:
     If set, Homebrew will use this editor when editing a single formula, or
     several formulae in the same folder.
diff --git a/share/man/man1/brew.1 b/share/man/man1/brew.1
index 245aee67cab8d43c8fd0f39e2e4d53e5041715c7..8909fa8efa7744e0f6e34c5068b97f539a659a13 100644
--- a/share/man/man1/brew.1
+++ b/share/man/man1/brew.1
@@ -203,6 +203,10 @@ HOMEBREW_DEBUG
 If set, instructs Homebrew to always assume \fB\-\-debug\fR when running commands\.
 .
 .TP
+HOMEBREW_DEBUG_INSTALL
+When a \fBbrew install \-d\fR or \fBbrew install \-i\fR drops into a shell, \fBHOMEBREW_DEBUG_INSTALL\fR will be set to the name of the formula being tried\.
+.
+.TP
 HOMEBREW_EDITOR
 If set, Homebrew will use this editor when editing a single formula, or several formulae in the same folder\.
 .