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.