Use rlwrap if detected.
This commit is contained in:
parent
8c9e0a7dae
commit
f83bf739e7
2 changed files with 6 additions and 11 deletions
|
@ -163,13 +163,6 @@ Other keys accepted:
|
|||
and the Plexus Classworlds container was an ornery beast causing
|
||||
much frustration. The maven-ant-tasks API is much more manageable.
|
||||
|
||||
**Q:** What if I need to type Unicode characters at the REPL?
|
||||
**A:** Jline does not support typing unicode characters (they show up
|
||||
as ? characters). In order to disable Jline support, set the environment
|
||||
variable LEIN_USE_JLINE=false and "lein repl" will not use the Jline
|
||||
library. You can also set the RLWRAP environment variable to
|
||||
"rlwrap" to retain some sanity when Jline is disabled.
|
||||
|
||||
## Publishing
|
||||
|
||||
If your project is a library and you would like others to be able to
|
||||
|
|
10
bin/lein
10
bin/lein
|
@ -71,11 +71,13 @@ if [ "$1" = "repl" ]; then
|
|||
echo "launched by either the lein-swank plugin or the lein-nailgun plugin."
|
||||
echo
|
||||
fi
|
||||
if [ "$LEIN_USE_JLINE" = "false" ]; then
|
||||
$RLWRAP java -client $JAVA_OPTS -cp "src/:classes/:$CLASSPATH" clojure.main ${@:2}
|
||||
else
|
||||
$RLWRAP java -client $JAVA_OPTS -cp "src/:classes/:$CLASSPATH" jline.ConsoleRunner clojure.main ${@:2}
|
||||
# Use rlwrap if it's available, otherwise fall back to JLine
|
||||
RLWRAP=`which rlwrap`
|
||||
JLINE=jline.ConsoleRunner
|
||||
if [ $RLWRAP != "" ]; then
|
||||
JLINE=
|
||||
fi
|
||||
$RLWRAP java -client $JAVA_OPTS -cp "src/:classes/:resources/:$CLASSPATH" $JLINE clojure.main ${@:2}
|
||||
elif [ "$1" = "self-install" ]; then
|
||||
if [[ $VERSION == *SNAPSHOT ]]; then
|
||||
echo "The self-install task is only meant for stable releases."
|
||||
|
|
Loading…
Reference in a new issue