Permalink
Browse files

Make nREPL the default evaluation mode

  • Loading branch information...
1 parent 0f63743 commit b6b608063de9aa513daa6266ce3fcfb3f54e62ab @trptcolin trptcolin committed Mar 2, 2012
Showing with 11 additions and 11 deletions.
  1. +3 −3 README.md
  2. +8 −8 src/clj/reply/main.clj
View
@@ -46,13 +46,13 @@ instance:
### Examples of fancy options:
-No options; standalone execution:
+Launch in [nREPL](https://github.com/clojure/tools.nrepl) mode:
$ reply
-Launch [nREPL](https://github.com/clojure/tools.nrepl) in interactive mode:
+Standalone execution (no nREPL):
- $ reply --nrepl
+ $ reply --standalone
Skip all the bells-and-whistles initialization and provide your own:
@@ -31,7 +31,7 @@
"-h" (recur (cons arg more) (assoc arg-map :help true))
"--help" (recur (cons arg more) (assoc arg-map :help true))
- "--nrepl" (recur (cons arg more) (assoc arg-map :nrepl true))
+ "--standalone" (recur (cons arg more) (assoc arg-map :standalone true))
"--color" (recur (cons arg more) (assoc arg-map :color true))
"--skip-default-init" (recur (cons arg more)
@@ -70,22 +70,22 @@
(defn launch
"Entry point for tools which may prefer to send a map of options rather than a
varargs list of arguments.
-Available options: [:help :custom-init :skip-default-init :nrepl :attach :port :color]
+Available options: [:help :custom-init :skip-default-init :standalone :attach :port :color]
See -main for descriptions."
[options]
(cond (:help options) (do (println (clojure.repl/doc -main)) (exit))
- (:nrepl options) (launch-nrepl options)
- :else (launch-standalone options)))
+ (:standalone options) (launch-standalone options)
+ :else (launch-nrepl options)))
(defn -main
"Launches a REPL. Customizations available:
-h/--help: Show this help screen
-i/--init: Provide a Clojure file to evaluate in the user ns
-e/--eval: Provide custom code to evaluate in the user ns
--skip-default-init: Skip the default initialization code
- --nrepl: Launch nREPL (clojure.tools.nrepl) in interactive mode
- --attach: Attach to an existing nrepl session on this port or host:port, when used with --nrepl
- --port: Start a new nrepl session on this port, when used with --nrepl
- --color: Use color; currently only available with --nrepl"
+ --standalone: Launch standalone mode instead of the default nREPL
+ --attach: Attach to an existing nREPL session on this port or host:port, when used with nREPL
+ --port: Start a new nREPL session on this port, when used with nREPL
+ --color: Use color; currently only available with nREPL"
[& args]
(launch (parse-args args)))

0 comments on commit b6b6080

Please sign in to comment.