just a quick question. I would like to start a repl from -main in an uberjar that has line editor and persistent history baked in, so the jar can be copied to any windows, mac or linux system and behaves the same. Additional features like rebel-readline would of course be welcome :-).
thank you for the quick reply! Yes, the clojure -Sdeps… works fine.
What I would like to have is a reasonable repl experience just from an uberjar without any additional installs (java -jar …). especially must work on windows (hopefully windows 10).
If this is not feasible, I will just use a full lein installation.
When you run the clojure -Sdeps ... command with Rebel readline, you hit this function:
Have you tried calling it yourself?
;; In your own namespace
;; You'll have to require ensure-terminal and repl
(core/ensure-terminal (repl))
To be honest, I’m not quite sure of what you’re trying to achieve. Do you want to get a Clojure REPL on a machine without installing Clojure? Or do you want to get rid of the GNU Readline dependency?
A word about your motivation might help us respond
Indeed, somehow the :main was missing in project.clj, so it always started the default repl . All versions work on mac now, I like (core/ensure-terminal (repl)), even (core/-main) works! As I need the :init hook, I used the code from rebel-deadline GitHub page with an additional :init option.
On Windows 7 it does not work, it says “Unable to detect a system Terminal”. I try Windows 10 later, but I believe it should work there with Windows Terminal.