Browse files

Evaluate custom prompt when it's a form

(as it is when entered via CLI arguments)
  • Loading branch information...
1 parent 2363fee commit 8e167d0295ea6247f0c393aedd29775816cf0e96 @trptcolin committed Apr 7, 2013
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/clj/reply/eval_modes/nrepl.clj
View
7 src/clj/reply/eval_modes/nrepl.clj
@@ -155,8 +155,11 @@
(swap! response-queues assoc
session (LinkedBlockingQueue.)
completion-session (LinkedBlockingQueue.))
- (let [options (assoc options :prompt
- (fn [ns] (str ns "=> ")))
+ (let [custom-prompt (:custom-prompt options)
+ options (assoc options :prompt
+ (cond (fn? custom-prompt) custom-prompt
+ (seq? custom-prompt) (eval custom-prompt)
+ :else (fn [ns] (str ns "=> "))))
options (if (:color options)
(merge options nrepl.cmdline/colored-output)
options)

0 comments on commit 8e167d0

Please sign in to comment.