clojureread-eval-print-loop

clj repl overwrites output


I start the repl with cjl and get the prompt

Clojure 1.11.1
user=>

At the user prompt I enter (+ 1 2 3) and hit return. The output is this:

user=> (+ 1 2 (+ 1 2 3)
6

I think the operation I entered is being overwritten.

I'm in i3 window manager but, when I quit back to the OS console, it does the same thing. How can I fix that.

If it matters, I'm on FreeBSD.


Solution

  • This is most likely due to a known issue with rlwrap (which clj uses to wrap the clojure script for interactive use).

    If you create .inputrc file in your home directory with the following contents, it should solve the problem:

    $if clojure
        set enable-bracketed-paste off
    $endif