From f14307932a316952fae8517c0fcb0962cd204e9a Mon Sep 17 00:00:00 2001
From: Michel Alexandre Salim <michel@sylvestre.me>
Date: Fri, 4 May 2012 10:56:38 +0700
Subject: [PATCH] lein-pkg: require rlwrap unconditionally, unless run inside
 Emacs or a dumb terminal;   chmod to 755 as this is an
 executable script

---
 bin/lein-pkg |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
 mode change 100644 => 100755 bin/lein-pkg

diff --git a/bin/lein-pkg b/bin/lein-pkg
old mode 100644
new mode 100755
index 8563da6..1b90ebe
--- lein-pkg.orig
+++ lein-pkg
@@ -3,6 +3,11 @@
 # This variant of the lein script is meant for downstream packagers.
 # It has all the cross-platform stuff stripped out as well as the
 # logic for running from checkouts and self-upgrading.
+#
+# Note to packagers:
+# rlwrap is now required unless running inside Emacs or in a dumb
+# terminal (this is to improve the 'lein repl' experience).
+# Make sure that your packaging pulls in rlwrap as a dependency
 
 export LEIN_VERSION="1.7.1"
 
@@ -103,10 +108,7 @@ fi
 
 # Use rlwrap if appropriate
 if ([ -z $INSIDE_EMACS ] && [ "$TERM" != "dumb" ]); then
-    which rlwrap > /dev/null
-    if [ $? -eq 0 ]; then
-        RLWRAP="rlwrap -r -m -q '\"'" # custom quote chars
-    fi
+    RLWRAP="rlwrap -r -m -q '\"'" # custom quote chars
     RLWRAP_CLJ_WORDS_FILE=${RLWRAP_CLJ_WORDS_FILE:-"${HOME}/.clj_completions"}
     RLWRAP_CLJ_WORDS_OPTION=""
     if [ -r "${RLWRAP_CLJ_WORDS_FILE}" ]; then
-- 
1.7.9.5

