Small dev utility for copying REPL output to the clipboard.
Via deps.edn
, typically in an alias:
{:deps
;; ...
:aliases
{:dev
{:extra-deps
{;; ...
replcp {:git/url "https://gist.github.com/vvvvalvalval/2ba72b7f05b82ab94da960c7d1f46e5c"
:sha "f842d9cca8cfcc4df8789c628e2577f6d1778461"}}}}}
;; require the namespace
(require 'replcp)
;; evaluate an expression at the REPL
(into []
(map (fn [n] {:a "foo" :b n :c (range n)}))
(range 20))
;; Call replcp/cp
(replcp/cp)
;; a pretty-printed representation of the last value has just been copied to the clipboard
E.g by require
-ing it from a dev namespace.
E.g to re-implement default-pprint-str
with something else than the Fipp library, or to use other Fipp options.
E.g an Emacs keybinding, or a Cursive Live Template or REPL Command.
For this to work, the REPL must be running on the same machine where your clipboard is!