Skip to content

Commit

Permalink
Clojure: only load readline history once.
Browse files Browse the repository at this point in the history
  • Loading branch information
kanaka committed Jan 9, 2015
1 parent f4c8a09 commit 47930f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clojure/src/readline.clj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
(def load-history (jna/to-fn Integer readline/read_history)))

(defn readline [prompt & [lib]]
(if (not @history-loaded)
(when (not @history-loaded)
(reset! history-loaded true)
(load-history HISTORY-FILE))
(let [line (readline-call prompt)]
(when line
Expand Down

0 comments on commit 47930f7

Please sign in to comment.