Skip to content
This repository
Browse code

Evaluate custom prompt when it's a form

(as it is when entered via CLI arguments)
  • Loading branch information...
commit 8e167d0295ea6247f0c393aedd29775816cf0e96 1 parent 2363fee
Colin Jones authored

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. +5 2 src/clj/reply/eval_modes/nrepl.clj
7 src/clj/reply/eval_modes/nrepl.clj
@@ -155,8 +155,11 @@
155 155 (swap! response-queues assoc
156 156 session (LinkedBlockingQueue.)
157 157 completion-session (LinkedBlockingQueue.))
158   - (let [options (assoc options :prompt
159   - (fn [ns] (str ns "=> ")))
  158 + (let [custom-prompt (:custom-prompt options)
  159 + options (assoc options :prompt
  160 + (cond (fn? custom-prompt) custom-prompt
  161 + (seq? custom-prompt) (eval custom-prompt)
  162 + :else (fn [ns] (str ns "=> "))))
160 163 options (if (:color options)
161 164 (merge options nrepl.cmdline/colored-output)
162 165 options)

0 comments on commit 8e167d0

Please sign in to comment.
Something went wrong with that request. Please try again.