From 754ffc99799c3a251634c1eff9a16eabbd73b31c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 22:14:32 -0300 Subject: A Python block sent to a REPL gets the second Enter that ends it A dogfood agent's `def` sent to python3 sat open at the continuation prompt: a block whose last line is indented is not over at one Enter, pasted into 3.13's REPL or typed into the old one (checked against python 3.14 in a real pty, both ways). A send to a Python REPL now adds that second Enter, and the pty/data recipe in the docs and the 9P skill says to. Co-Authored-By: Claude Opus 5.5 --- docs/fs.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/fs.md b/docs/fs.md index a883e185..2dee3a49 100644 --- a/docs/fs.md +++ b/docs/fs.md @@ -300,7 +300,9 @@ the tag is how to run `make` from that file), `Exec ` run by name 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`, multi-line code as a bracketed paste (`\e[200~\e[201~` -then `\r`), since line by line a blank line ends a Python block and Python +then `\r`, and a second `\r` when its last line is indented: one Enter +leaves a block open, pasted or typed; a middle click sends that second one +itself), since line by line a blank line ends a Python block and Python 3.14's REPL auto-indents each line typed into it. The REPL gets the text wherever it is -- at a `pdb` or `input()` prompt too. Bindings are not dumped, so a Restore leaves none. -- cgit v1.3