The rlwrap method is very cool, but I can't seem to get ctrl-C to work (it still quits to the terminal)
any advice? --Robert McIntyre On Sat, Dec 18, 2010 at 3:01 PM, Mike Meyer <mwm-keyword-googlegroups.620...@mired.org> wrote: > On Fri, 17 Dec 2010 22:45:01 -0800 (PST) > tor <torgau...@gmail.com> wrote: >> Is there a way to activate word completion in the repl? I find myself >> hitting tab all the time... > > Since nobody else mentioned it (or even offered a solution other than > "Try my environment"), you can use rlwrap (should be available in your > systems package manager) to run your repl, and get word completion - > among other goodies one wants on a command line. > > The appropriate rlwrap invocation is: > > rlwrap --command clojure --complete-filenames --quote-characters='"' > --prompt-colour=Red > > followed by whatever command you use to start the repl. > > You'll also want to past this code into a repl running in your home > directory: > > (def completions > (reduce concat (map (fn [ns] (keys (ns-publics ns))) (all-ns)))) > > (defn save-completions-to [filename] > (with-open [f (java.io.BufferedWriter. (java.io.FileWriter. filename))] > (.write f (apply str (interleave completions (repeat "\n")))))) > > (save-completions-to ".clojure_completions") > > to create the list of completions for rlwrap. > > <mike > -- > Mike Meyer <m...@mired.org> http://www.mired.org/consulting.html > Independent Network/Unix/Perforce consultant, email for more information. > > O< ascii ribbon campaign - stop html mail - www.asciiribbon.org > > -- > 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 > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en