Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I start the REPL in a user defined namespace?

Writing (in-ns 'dbx) to a file and loading it isn't changing the default namespace of the repl (using cygwin/console). The namespace is still user=>, not dbx=>.

vikrant[28] clj
Clojure 1.3.0
user=> (load-file "try1.clj")
#(Namespace dbx)
user=>

How can we start the REPL in a namespace defined in a script file?

like image 918
vikbehal Avatar asked Nov 29 '11 05:11

vikbehal


1 Answers

Nowadays is :repl-options {:init-ns foo.bar}.

See https://github.com/technomancy/leiningen/blob/master/sample.project.clj

like image 163
Carlos Fontes Avatar answered Oct 06 '22 23:10

Carlos Fontes