This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-27
Channels
- # admin-announcements (1)
- # announcements (1)
- # babashka (16)
- # beginners (222)
- # bristol-clojurians (6)
- # calva (13)
- # cestmeetup (5)
- # cider (19)
- # cljs-dev (2)
- # cljsrn (4)
- # clojure (65)
- # clojure-europe (31)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-uk (33)
- # clojurescript (64)
- # community-development (5)
- # core-async (18)
- # cursive (15)
- # datomic (6)
- # devcards (1)
- # emacs (18)
- # figwheel-main (102)
- # fulcro (51)
- # graalvm (2)
- # helix (8)
- # instaparse (33)
- # jobs (8)
- # jobs-discuss (3)
- # leiningen (42)
- # off-topic (88)
- # pedestal (15)
- # re-frame (18)
- # reagent (26)
- # reitit (15)
- # rum (3)
- # shadow-cljs (119)
- # spacemacs (9)
- # sql (2)
- # tools-deps (7)
Is there a way using deps.edn
to add code that gets eval'd on startup for an alias or for a repl launched using clj
? The problem I'm specifically trying to solve is requiring jansi-clj
for any terminal clojure session so it picks up my system terminal colors, but I was wondering if there was a generally recommended approach to the problem of "default startup code" using tools-deps
.
you can use clojure.main's -i or -e sometimes for things likee this
clj -h
will tell you more
-i loads an arbitrary clj file, -e runs an expression
got it, so it's the simple matter of combining -e (require 'jansi-clj.auto) -r
to launch a repl with some short startup code, and -i "/path/to/file" -r
for anything longer. thanks!
yep, and you can put that in an alias with :main-opts
so clj -A:repl
or whatever