--- drush.orig  2010-09-26 17:38:04.000000000 -0700
+++ drush       2010-09-26 17:38:04.000000000 -0700
@@ -5,6 +5,9 @@
 # php executable it can find.
 #

+# Suppress HTTP headers which php generates by default unless WITH_HEADERS is set
+[ $WITH_HEADERS ] || SUPPRESS_HEADERS='-q'
+
 # Get the absolute path of this executable
 ORIGDIR=$(pwd)
 SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH=$SELF_PATH/$(basename -- "$0")
@@ -38,16 +41,16 @@
 # Special case for *AMP installers, since they normally don't set themselves as the default cli php out of the box.
 for php in /Applications/MAMP/bin/php5/bin/php /Applications/MAMP/bin/php5.2/bin/php /Applications/MAMP/bin/php5.3/bin/php /opt/lampp/bin/php /Applications/xampp/xamppfiles/bin/php /Applications/acquia-drupal/php/bin/php; do
   if [ -x $php ]; then
-    exec $php $SCRIPT_PATH --php="$php" "$@"
+    exec $php $SUPPRESS_HEADERS $SCRIPT_PATH --php="$php" "$@"
   fi
 done

 # We check for a command line (cli) version of php, and if found use that.
 which php-cli >/dev/null 2>&1
 if [ "$?" = 0 ] ; then
-  exec php-cli $SCRIPT_PATH --php="php-cli" "$@"
+  exec php-cli $SUPPRESS_HEADERS $SCRIPT_PATH --php="php-cli" "$@"
 else
   # Alternatively we run with straight php, which works on most other systems.
   # The --php=`which php` is for Dreamhost, which behaves oddly.  See http://drupal.org/node/662926
-  exec php $SCRIPT_PATH --php=`which php` "$@"
+  exec php $SUPPRESS_HEADERS $SCRIPT_PATH --php=`which php` "$@"
 fi