summaryrefslogtreecommitdiff
path: root/docs/fs.md
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 14:31:42 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commiteeadda6e7db3334e15708de2d7b5396f539c8186 (patch)
tree0852baa53df5df01dcb41b48f787044fae78fdf6 /docs/fs.md
parent8d93016e923565e2e8b73aa7b549dd65b5d18a8c (diff)
downloadpardes-eeadda6e7db3334e15708de2d7b5396f539c8186.tar.gz
pardes-eeadda6e7db3334e15708de2d7b5396f539c8186.zip
A terminal bound as a language's REPL takes the execs made on that language's files
Repl python in a terminal's tag or on its ctl binds it (Repl - unbinds, Repl bare says the binding, the same word again changes nothing), with an id, python-a, python-b, in its tag. An exec made by a gesture on the body of a file in that language -- a middle click or the execute key, on any text, a single word too -- or on the REPL's own body is typed into it, bracketed if its program asked for that, else line by line with a once-said warning for Python's blank lines, then Enter; the message row says -> python-a in the tag's name tint, the log send <from> <to> <id>. Several bound for the language: the pane asks which on its notice band, as Del asks, one key answering, Esc none, nothing remembered. The gesture is known where it is dispatched (mouse.zig, the execute key), so the tag's words, Exec <text> run by name and a command word @`cmd` stay commands, and a 9P exec is never sent. A finished command pane is no REPL; bindings are not dumped. The docs spell out the escapes, the pdb and input() caveat and the no-bracketed-paste papercut. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/fs.md')
-rw-r--r--docs/fs.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/fs.md b/docs/fs.md
index d3e32e3a..e93704a6 100644
--- a/docs/fs.md
+++ b/docs/fs.md
@@ -253,6 +253,27 @@ same tree without leaving the process.
command that says so and ends `exit 127`. `echo Tty > pane/<n>/ctl` makes
an interactive terminal in that pane's directory.
+A terminal can be bound as a language's REPL: `Repl python` in its tag or
+on its `ctl` (the language names are the syntax table's; `Repl -` unbinds,
+`Repl` bare says the binding, `Repl python` again changes nothing). Its tag
+shows its id, `python-a`, `python-b` for the next, a freed letter reused.
+Then an exec made by a gesture on the body of a file in that language -- a
+middle click, the execute key, on a selection or a single word, even `make`
+in a comment -- or on the REPL's own body is typed into the REPL instead of
+run: bracketed paste when its program asked for it (DECSET 2004), else line
+by line, where a blank line inside a Python block ends the block (said
+once), then Enter. The message row says `→ python-a` in the tag's name tint
+and the log `send <from> <to> <id>`. With several REPLs bound for the
+language the pane asks which, on its notice band, one key answering and Esc
+sending nowhere; nothing is remembered. A command pane whose command is done
+is no REPL any more. Still commands, whatever is bound: a word in a tag (so
+the tag is how to run `make` from that file), `Exec <text>` run by name
+(typed, a 2-1 chord onto `Exec`, a `ctl` line) and a command word @`cmd` in
+the text, looked at or clicked (`# @`pytest -x`` in a script). A 9P `exec`
+is no gesture and is never sent: a script writes to the REPL pane's
+`pty/data`. The REPL gets the text wherever it is -- at a `pdb` or `input()`
+prompt too. Bindings are not dumped, so a Restore leaves none.
+
The root's pair clicks at the active pane and `/pane/<n>/look` and
`/pane/<n>/exec` at that pane. Blank lines are skipped, and every other line
is checked before any of them runs, so a control character fails the whole