On Oct 25, 5:27 pm, Timothy Pratley <[EMAIL PROTECTED]> wrote:
> > (set! *print-length* 50)
>
> Ah perfect. Thanks! Is there a way to make this default?

clojure.lang.Repl will run all the files listed before it goes to
the prompt. So I have my clj script updated to accept a
.cljrc.clj file that has my settings:

clj launch script -- start:
  #!/bin/bash

  BREAK_CHARS="(){}[],[EMAIL PROTECTED]";:'|\\"
  CLJRC=~/.cljrc.clj

  if [ $# -eq 0 ]; then
       rlwrap --remember -b $BREAK_CHARS -f /home/
parth/.clj_completions \
       java -server -cp $CLASSPATH clojure.lang.Repl $CLJRC
  else
       java -server -cp $CLASSPATH clojure.lang.Script "$@"
  fi

clj launch script -- end:

Note the $CLJRC above. On windows you should be able to
do something similar to the batch file you use for launching
clojure repl (clj.bat I assume from 
http://en.wikibooks.org/wiki/Clojure_Programming#Installation)
Note the I haven't used $CLJRC for clojure.lang.Script as I want
to run my scripts in a clean environment. You could use $CLJRC
with scripts also if you want to.

.cljrc.clj file -- start:
  (set! *print-length* 50)
  (set! *print-level* 10)

. cljrc.clj file -- end:

I then to use the .cljrc.clj file for any settings I want to
use across repls (including any convenience functions as
it just a regular clojure source file).

Parth

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to