On Jan 15, 2009, at 17:31, Chouser wrote:

> I had a launch script (which I've now lost due to my own clumsiness)
> that defaulted to a repl if given no file options, and always loaded a
> .clojurerc.clj file before starting a repl (whether it was by default
> or specifically asked via -r).  This allowed me to load repl-utils and
> get *print-length* set up before getting a prompt.  But if a file was
> named with now -r, it was run with no repl.  It used appropriate
> combinations of clojure.lang.Repl or clojure.lang.Script and file
> paths to make this happen.
>
> As far as I can tell this is impossible with clojure.main, which
> appears to only allow loading a file *or* starting a repl.  Am I
> missing a method to support this, or should I go back to using
> Script/Repl?

If I understand correctly what you are looking for, it exists. Here  
is my standard command line for starting Clojure:

java  -cp $HOME/.clojure/clojure.jar:$HOME/.clojure/clojure- 
contrib.jar clojure.main -i $HOME/.clojure/repl-init.clj -r

This first executes repl-init.clj (from where I load repl-utils, set  
*print-length* etc.) and then starts the repl.

Konrad.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to