Created
September 28, 2012 03:43
-
-
Save lfborjas/3797827 to your computer and use it in GitHub Desktop.
How I got my clojure readline working (assuming clojure was installed via homebrew)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sorted-map | |
;I have this stored in /usr/local/Cellar/clojure/1.3.0/.clj_completions | |
read-line | |
re-pattern | |
keyword? | |
unchecked-inc-int | |
val | |
chunked-seq? | |
find-protocol-impl | |
vector-of | |
object-array | |
*compile-path* | |
max-key | |
list* | |
ns-aliases | |
booleans | |
the-ns | |
== | |
chunk-buffer | |
longs | |
shorts | |
instance? | |
format | |
sequential? | |
fn? | |
empty | |
bound-fn | |
dorun | |
time | |
remove-method | |
gensym | |
not= | |
*3 | |
unchecked-multiply | |
doseq | |
bit-or | |
aset-byte | |
if-not | |
hash-set | |
->Vec | |
add-watch | |
unchecked-dec | |
some | |
nil? | |
string? | |
boolean-array | |
second | |
letfn | |
keys | |
for | |
*2 | |
long-array | |
pop-thread-bindings | |
error-mode | |
cond | |
bit-set | |
spit | |
find-protocol-method | |
fn | |
sorted? | |
short-array | |
ns-unalias | |
ns-publics | |
EMPTY-NODE | |
char-array | |
dosync | |
all-ns | |
long | |
with-open | |
init-proxy | |
add-classpath | |
false? | |
await1 | |
true? | |
gen-interface | |
sync | |
short | |
ns-unmap | |
repeat | |
zipmap | |
distinct | |
get-in | |
bit-xor | |
char-escape-string | |
complement | |
let | |
get-validator | |
dotimes | |
ref-max-history | |
*ns* | |
promise | |
defmethod | |
-' | |
pop! | |
derive | |
aset-float | |
extend | |
-reset-methods | |
lazy-cat | |
commute | |
defstruct | |
with-in-str | |
partition-by | |
rem | |
odd? | |
symbol? | |
*print-level* | |
*allow-unresolved-vars* | |
thread-bound? | |
proxy-call-with-super | |
*unchecked-math* | |
ns-interns | |
re-matches | |
split-with | |
munge | |
loop | |
future-done? | |
next | |
import | |
deliver | |
symbol | |
vals | |
->ArrayChunk | |
select-keys | |
re-matcher | |
rand | |
deref | |
unchecked-inc | |
*math-context* | |
read | |
sequence | |
make-hierarchy | |
+ | |
number? | |
assoc! | |
descendants | |
into-array | |
last | |
some-fn | |
unchecked-negate | |
integer? | |
defrecord | |
*read-eval* | |
alter | |
prn | |
with-meta | |
with-out-str | |
floats | |
* | |
*compile-files* | |
when-not | |
butlast | |
- | |
->> | |
reversible? | |
rseq | |
send-off | |
seq? | |
refer-clojure | |
identical? | |
.. | |
vary-meta | |
with-loading-context | |
agent-error | |
*command-line-args* | |
bit-flip | |
zero? | |
bit-and | |
unquote-splicing | |
future | |
re-groups | |
*warn-on-reflection* | |
newline | |
replicate | |
keep-indexed | |
char? | |
distinct? | |
remove-ns | |
ratio? | |
xml-seq | |
vec | |
concat | |
update-in | |
vector | |
with-bindings* | |
conj | |
bases | |
with-redefs | |
/ | |
unchecked-add | |
ref-set | |
assoc | |
unchecked-remainder-int | |
seque | |
aset-char | |
boolean | |
read-string | |
neg? | |
float-array | |
doubles | |
isa? | |
future-call | |
doto | |
extends? | |
remove-watch | |
print-str | |
*e | |
ref-history-count | |
rsubseq | |
*flush-on-newline* | |
*out* | |
future? | |
vector? | |
split-at | |
chunk-cons | |
ns-refers | |
create-struct | |
proxy-super | |
int-array | |
unchecked-long | |
float | |
assert | |
map | |
+' | |
counted? | |
memfn | |
double-array | |
accessor | |
*print-length* | |
frequencies | |
chars | |
class? | |
rand-int | |
*1 | |
aset-short | |
unchecked-short | |
prn-str | |
iterate | |
chunk-append | |
when-first | |
unchecked-double | |
slurp | |
restart-agent | |
unchecked-int | |
mapcat | |
assoc-in | |
get-thread-bindings | |
special-symbol? | |
ref | |
conj! | |
find-var | |
inc | |
future-cancel | |
every-pred | |
definline | |
bound-fn* | |
unchecked-subtract | |
ns-name | |
shuffle | |
defn- | |
*file* | |
re-find | |
bit-not | |
construct-proxy | |
ref-min-history | |
destructure | |
seq | |
intern | |
unchecked-multiply-int | |
pvalues | |
to-array-2d | |
sorted-map-by | |
filter | |
->VecNode | |
*verbose-defrecords* | |
*clojure-version* | |
var? | |
alter-meta! | |
unchecked-dec-int | |
comment | |
key | |
class | |
re-seq | |
-cache-protocol-fn | |
ns | |
empty? | |
test | |
print-dup | |
create-ns | |
name | |
list? | |
nthrest | |
aset | |
nnext | |
doall | |
extenders | |
macroexpand-1 | |
not-any? | |
resultset-seq | |
reductions | |
into | |
with-precision | |
*use-context-classloader* | |
transient | |
ffirst | |
bit-clear | |
proxy-name | |
extend-type | |
load-reader | |
with-redefs-fn | |
or | |
hash | |
inc' | |
print-ctor | |
associative? | |
float? | |
drop-last | |
replace | |
decimal? | |
defn | |
parents | |
map? | |
prefers | |
numerator | |
condp | |
quot | |
chunk-rest | |
unchecked-negate-int | |
file-seq | |
send | |
with-local-vars | |
reverse | |
with-bindings | |
count | |
get-proxy-class | |
set | |
unchecked-subtract-int | |
when-let | |
comp | |
nth | |
byte | |
dissoc! | |
*err* | |
constantly | |
load | |
namespace | |
pr-str | |
< | |
rationalize | |
sort-by | |
->VecSeq | |
cycle | |
peek | |
denominator | |
reduce | |
interleave | |
amap | |
-> | |
cons | |
macroexpand | |
var-set | |
str | |
aset-boolean | |
ns-imports | |
while | |
remove-all-methods | |
first | |
bean | |
= | |
memoize | |
var-get | |
unchecked-float | |
range | |
tree-seq | |
defmacro | |
set-validator! | |
aset-double | |
*' | |
case | |
unchecked-divide-int | |
enumeration-seq | |
prefer-method | |
partition-all | |
ensure | |
find-ns | |
not-every? | |
struct-map | |
> | |
max | |
proxy-mappings | |
identity | |
ints | |
fnext | |
biginteger | |
min-key | |
reset-meta! | |
push-thread-bindings | |
unchecked-add-int | |
subs | |
compile | |
agent-errors | |
clear-agent-errors | |
printf | |
ns-resolve | |
method-sig | |
>= | |
shutdown-agents | |
reset! | |
even? | |
require | |
bit-shift-left | |
dec' | |
methods | |
future-cancelled? | |
compare | |
deftype | |
sorted-set-by | |
cast | |
namespace-munge | |
supers | |
pcalls | |
load-string | |
group-by | |
get | |
<= | |
await | |
resolve | |
bytes | |
print-method | |
bound? | |
loaded-libs | |
fnil | |
force | |
partial | |
pmap | |
if-let | |
comparator | |
pos? | |
char | |
take-while | |
extend-protocol | |
and | |
refer | |
underive | |
in-ns | |
iterator-seq | |
declare | |
ancestors | |
hash-combine | |
persistent! | |
locking | |
partition | |
map-indexed | |
contains? | |
update-proxy | |
interpose | |
chunk | |
aset-int | |
ifn? | |
definterface | |
load-file | |
delay | |
apply | |
swap! | |
defmulti | |
proxy | |
reify | |
subvec | |
byte-array | |
rest | |
keyword | |
ns-map | |
set-error-mode! | |
unquote | |
int | |
release-pending-sends | |
mod | |
bigdec | |
nfirst | |
nthnext | |
*agent* | |
aset-long | |
struct | |
array-map | |
unchecked-char | |
bigint | |
dec | |
println | |
aget | |
find-keyword | |
pr | |
drop | |
clojure-version | |
*print-dup* | |
gen-class | |
eval | |
aclone | |
char-name-string | |
pop | |
primitives-classnames | |
atom | |
defonce | |
bit-shift-right | |
delay? | |
num | |
realized? | |
disj | |
io! | |
*print-readably* | |
rational? | |
merge-with | |
take-nth | |
*fn-loader* | |
*print-meta* | |
double | |
lazy-seq | |
*in* | |
take-last | |
line-seq | |
take | |
unchecked-byte | |
when | |
areduce | |
set? | |
make-array | |
rand-nth | |
alias | |
use | |
juxt | |
alength | |
chunk-first | |
*source-path* | |
defprotocol | |
to-array | |
hash-map | |
bit-and-not | |
compare-and-set! | |
*assert* | |
type | |
repeatedly | |
trampoline | |
set-error-handler! | |
remove | |
find | |
coll? | |
drop-while | |
not-empty | |
flatten | |
println-str | |
list | |
chunk-next | |
every? | |
satisfies? | |
flush | |
sort | |
dissoc | |
not | |
binding | |
error-handler | |
get-method | |
agent | |
sorted-set | |
alter-var-root | |
merge | |
subseq | |
min | |
print-simple | |
bit-test | |
await-for | |
keep | |
disj! | |
meta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#I have this stored in /usr/local/Cellar/clojure/1.3.0/bin/clj | |
#!/bin/sh | |
# clj - Clojure launcher script | |
BREAK_CHARS="\(\){}[],^%\$#@\"\";:''|\\" | |
cljjar='lib/clojure.jar' | |
cljclass='clojure.main' | |
cljcompletions='.clj_completions' | |
CLOJURE=$CLASSPATH:/usr/local/Cellar/clojure/1.3.0/clojure-1.3.0.jar:${PWD} | |
dir=$0 | |
while [ -h "$dir" ]; do | |
ls=`ls -ld "$dir"` | |
link=`expr "$ls" : '.*-> \(.*\)$'` | |
if expr "$link" : '/.*' > /dev/null; then | |
dir="$link" | |
else | |
dir=`dirname "$dir"`"/$link" | |
fi | |
done | |
dir=`dirname $dir` | |
dir=`cd "$dir" > /dev/null && pwd` | |
cljjar="$dir/../$cljjar" | |
cp="${PWD}:${cljjar}" | |
cljcompletions="$dir/../$cljcompletions" | |
# Add extra jars as specified by `.clojure` file | |
# Borrowed from <http://github.com/mreid/clojure-framework> | |
if [ -f .clojure ]; then | |
cp=$cp:`cat .clojure` | |
fi | |
if [ $# -eq 0 ]; then | |
rlwrap --remember -c -b $BREAK_CHARS -f $cljcompletions java -cp "$CLOJURE" $cljclass | |
else | |
exec java -classpath "$CLOJURE" $cljclass $* | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment