Welcome! Please see the About page for a little more info on how this works.

+1 vote
in REPL by
retagged by

After pressing the Return key to submit an expression to the REPL, the prompt on that line has started disappearing:

before

after

In the above example, after Return was pressed, the first line after the Clojure version number should still show:

user=> 123

but it is instead only showing:

123

i.e. the prompt disappears.

1 Answer

+4 votes
by
edited by
 
Best answer

This is because the clj command internally uses the rlwrap command to provide conventional REPL keyboard shortcuts.

rlwrap in turn uses the readline library, and the latest version of that (8.1) has exposed a bug in rlwrap, causing the disappearing prompt:

https://github.com/hanslub42/rlwrap/issues/108

Until a fixed release of the rlwrap command is available, this bug can be worked around by adding the following to an .inputrc file in your home directory (i.e. ~/.inputrc — create it if it doesn't already exist)

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

If exiting and restarting the clj command isn't enough for that new configuration to be picked up, try restarting your terminal too.


UPDATE: rlwrap version 0.44 has been released, making the workaround described above no longer needed. See here for which version of rlwrap is available in various package repositories.

by
Thank you! That's been driving me crazy!
...