What is the recommended way to run standalone clojure REPL?

I use rlwrap, but I don’t have tab execution, and characters with accents become crippled. This is on OSX 10.6 at Terminal.app.

+5
source share
2 answers

Use the flag to -fenter rlwrap to activate the tab. This will be a static termination, although based on a static list of characters in the file you define. If you need dynamic termination (based on any character defined in the current REPL), you should try Emacs + SLIME or the equivalent.

, . , ​​ Clojure . ( clojure -contrib; clojure.contrib.io duck-streams .)

user> (use 'clojure.contrib.io)
nil
user> (with-out-writer "/home/user/.clj-tabcompletion"
        (doseq [[sym _] (ns-publics 'clojure.core)]
          (println sym)))
nil

:

$ rlwrap -f ~/.clj-tabcompletion java -jar clojure.jar
Clojure 1.2.0-master-SNAPSHOT
user=> def<TAB>
definline    defmacro     defmethod    defmulti     defn         defonce      defprotocol  defstruct    deftype
user=> def

, , , . . OS X , , . Konsole Linux, rlwrap:

user=> (println "àèìòùáéíóúäëïöüâêîôûãõñ")
àèìòùáéíóúäëïöüâêîôûãõñ
nil
user=> (println "牛が牧場で草を食べている。")
牛が牧場で草を食べている。
nil
+2

ClojureX , OS X. ( - Linux), , ClojureX , ( ? rlwrap...).

: Clojure re: ClojureX...

, readline, JVM - jline. -

java -cp $CLASSPATH jline.ConsoleRunner clojure.main

( jline.jar, $CLASSPATH, ), .

, , - Clojure REPL. Emacs/Aquamacs + SLIME, Vimclojure Java IDE Clojure . , (. ). , jline. ClojureX - . , ... : ClojureX - , .

+3

All Articles