ludus/justfile

21 lines
818 B
Makefile
Raw Permalink Normal View History

2024-01-08 03:58:03 +00:00
# open a janet repl in a different os window
2023-12-31 23:37:09 +00:00
repl:
2024-04-06 20:58:11 +00:00
kitten @ launch --type=os-window --allow-remote-control --cwd=current --title=hx_repl:ludus --keep-focus
2024-01-19 21:50:01 +00:00
kitten @ send-text -m "title:hx_repl:ludus" "janet -s\n"
2024-01-08 01:09:01 +00:00
2024-01-19 21:50:01 +00:00
restart:
kitten @ send-text -m "title:hx_repl:ludus" "\04"
kitten @ send-text -m "title:hx_repl:ludus" "janet -s\n"
2024-01-08 03:58:03 +00:00
# send what's selected to the repl and evaluate it
2024-01-08 01:09:01 +00:00
eval:
2024-01-08 03:58:03 +00:00
sd "$" "\n" | sd "\n\n" "\n" | kitten @ send-text -m "title:hx_repl:ludus" --stdin
2024-01-08 01:09:01 +00:00
2024-01-08 03:58:03 +00:00
# send what's selected to a buffer, and then evaluate what's in the buffer
2024-01-08 01:09:01 +00:00
buffer:
2024-01-19 21:50:01 +00:00
sd "$" "\n" | sd "\n\n" "\n" > .repl-buffer.janet
kitten @ send-text -m "title:hx_repl:ludus" "(import ./.repl-buffer :prefix \"\")"
2023-12-31 23:37:09 +00:00
2024-04-06 20:58:11 +00:00
doc:
sd "$" "\n" | sd "\n\n" "\n" | xargs -I _ echo "(doc " _ ")" | kitten @ send-text -m "title:hx_repl:ludus" --stdin