Open arichiardi opened 6 years ago
Hi @arichiardi
There are two ways you can do that on clojure rebel prompt.
By invoking the keybinding C-x C-d on the function name
Other way is to use clojure.repl namespace
=> (use 'clojure.repl)
=> (doc reify)
I hope this helps.
Oh, I thought it was kind of following the normal REPL bindings. Is this planned or do you want me close it.
I think shortcut is a good thing, though i am not sure if it is planned. I think a good way would be to start the repl with (use 'clojure.repl)
though i dont know how to do that when start a repl. Let this be open. I hope someone will tell us how to start deps.edn
with dependencies.
Yeah I ended up doing exactly that:
user=> (use 'clojure.repl)
nil
user=> (doc var)
-------------------------
var
(var symbol)
Special Form
The symbol must resolve to a var, and the Var object
itself (not its value) is returned. The reader macro #'x expands to (var x).
Please see http://clojure.org/special_forms#var
I really hope there is some way in ~/.clojure/deps.edn
to start repl with native dependencies.
Using this at the moment: https://gist.github.com/arichiardi/8ad47f5edf185876e82015739f038a22
Ideally rebel-readline.cljs.main
should do (use 'clojure.repl)
for me? Maybe?
Your alias doesnt seem to be working for me. My alias is the following for rebel readline:
alias cljrebl='clj -Sdeps "{:deps {com.bhauman/rebel-readline {:mvn/version \"0.1.3\"}}}" -J--add-modules -Jjava.xml.bind -m rebel-readline.main'
The Java XML bind is used because the latest Java version 10 deprecated java.xml so it needs to be required for clojure to work with latest java.
I didnt notice the accompanying deps.edn
this is good. Thanks!
Oh ok, you need alias + deps.edn
of course, it is working fine here, I did not want to include the rebel dep in the alias itself because of the escaping stuff.
You can use -e --eval
option to automaticity load lib and add it to namespace with use
So, to load rebel with docs from command line:
clj -Sdeps "{:deps {com.bhauman/rebel-readline {:mvn/version \"0.1.4\"}}}" -e "(use 'clojure.repl)(use 'clojure.java.javadoc)" -m rebel-readline.main
Or add this to your deps.edn :aliases :
:rebel {:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
:main-opts ["-e" "(use,'clojure.repl)(use,'clojure.java.javadoc)"
"-m" "rebel-readline.main"]}
Hey Bruce, quick report :smile:
Example:
Compare with:
I launch
rebel
with: