From f0cb86a74930fb2b3a8fac386a8172173b6a4b35 Mon Sep 17 00:00:00 2001
From: Martin Kuehl <martin.kuehl@gmail.com>
Date: Wed, 25 Mar 2009 19:18:28 +0100
Subject: [PATCH 7/7] =?utf-8?q?=E2=80=A2=20Set=20:interactive=5Finput=20to=20false=20if=20TM=5FINTERACTIVE=5FINPUT=5FDISABLED
=20=20=20is=20defined.
=20=E2=80=A2=20Document=20this=20behaviour.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

---
 lib/tm/executor.rb |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/lib/tm/executor.rb b/lib/tm/executor.rb
index 0b50a1b..0b79d2b 100644
--- a/lib/tm/executor.rb
+++ b/lib/tm/executor.rb
@@ -37,6 +37,10 @@
 #     The rules of String.sub apply.  By default, this just extracts $1 from the match.
 #   :verb describes what the call to Executor is doing.  Default is “Running”.
 #   :env is the environment in which the command will be run.  Default is ENV.
+#   :interactive_input tells Executor to inject the interactive input library
+#     into the program so that any requests for input present the user with a
+#     dialog to enter it. Default is true, or false if the environment has
+#     TM_INTERACTIVE_INPUT_DISABLED defined.
 #   :script_args are arguments to be passed to the *script* as opposed to the interpreter.  They will
 #     be appended after the path to the script in the arguments to the interpreter.
 #   :use_hashbang Tells Executor wether to override it's first argument with the current file's #! if that exists.
@@ -65,13 +69,14 @@ module TextMate
         block ||= Proc.new {}
         args.flatten!
 
-        options = {:version_args    => ['--version'],
-                   :version_regex   => /\A(.*)$/,
-                   :version_replace => '\1',
-                   :verb            => "Running",
-                   :env             => nil,
-                   :script_args     => [],
-                   :use_hashbang    => true}
+        options = {:version_args      => ['--version'],
+                   :version_regex     => /\A(.*)$/,
+                   :version_replace   => '\1',
+                   :verb              => "Running",
+                   :env               => nil,
+                   :interactive_input => ENV['TM_INTERACTIVE_INPUT_DISABLED'].nil?,
+                   :script_args       => [],
+                   :use_hashbang      => true}
         
         passthrough_options = [:env, :input, :interactive_input]
 
-- 
1.6.1.3

