How can I get readline-like (or rlwrap-like) functionality from my REPL when I use the repl
function from clojure.main
?
The background to this is that I'm utilizing and customizing the break
function from The Joy of Clojure, First Edition. I'm using it from inside the lein repl
REPL. When my "breakpoint" kicks in, the readline-like functionality of Leiningen's REPL is gone, which is kind of inconvenient. My muscle memory makes me hit ↑ followed quickly by Enter. Before I can stop myself, I've got this in my terminal:
debug=> ^[[A
CompilerException java.lang.RuntimeException: Unable to resolve symbol: in this context, compiling:(/tmp/form-init13211381000659590518.clj:1:1)
And now my REPL is stuck and I have to kill the terminal or the process to get out. I'd like very much if I could either get readline working in this second-level REPL or at least prevent this common issue from derailing my debug sessions.
rlwrap
helping here? – Starlalein repl
REPL, but not in the REPL within the REPL. – Nettilein repl
brings its own readline stuff. Sorlwrap
is what i am using with non-lein-repl. So i'd assume that rlwrap alone (no-lein-outer-repl, inner-repl) would not care (unless the repl-in-a-repl messes with std(out|in). Yet i don't know how to disable the jreadline2 (?) support in lein. – Starla