This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-19
Channels
- # aws (2)
- # babashka (4)
- # babashka-sci-dev (7)
- # beginners (92)
- # biff (7)
- # calva (64)
- # cider (2)
- # cljsrn (14)
- # clojure (8)
- # clojure-australia (5)
- # clojure-europe (14)
- # clojure-norway (8)
- # clojure-spec (36)
- # clojurescript (19)
- # component (15)
- # cursive (1)
- # data-science (6)
- # girouette (5)
- # hyperfiddle (3)
- # juxt (5)
- # leiningen (10)
- # lsp (7)
- # malli (12)
- # nbb (90)
- # polylith (1)
- # portal (11)
- # rdf (7)
- # reagent (6)
- # reitit (40)
- # remote-jobs (1)
- # shadow-cljs (21)
- # specter (5)
- # squint (83)
- # tools-deps (17)
- # vim (7)
I have this simple program:
(ns test-read-line.core)
(def prompt "user> ")
(defn -main [& args]
(loop []
(print prompt)
(flush)
(let [input (read-line)]
(when input
(println (str "input: >>>" input "<<<"))
(recur)))))
When I execute it without rlwrap I get this:
$ bb -m test-read-line.core
user> hello
input: >>>hello<<<
user>
When I execute it with rlwrap I get this:
$ rlwrap bb -m test-read-line.core
hello
input: >>>hello<<<
user>
Does anyone know why the "user> " before "hello" is deleted when using rlwrap? 1
as a data point, I don't see what you see on my Mac using iTerm:
➜ ~ bb -cp . -m test-read-line.core
user> hi
input: >>>hi<<<
user> %
➜ ~ rlwrap bb -cp . -m test-read-line.core
user> hi
input: >>>hi<<<
user>
➜ ~ bb --version
babashka v0.9.161
➜ ~ rlwrap --version
rlwrap 0.45
➜ ~
I'm running Linux Mint 21. I found this : https://github.com/hanslub42/rlwrap/issues/108 and, using the suggested fix:
thus, adding set enable-bracketed-paste off to my ~/.inputrc fixes the problem
fixes the problem. 2