From e933535c9c78695dbcc469fff6a966601fd6c8f6 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 04:58:55 -0300 Subject: The docs: the raw paste's second Enter, event flags and write-back, a new Tty's ls Round 14's doc findings: a raw pty/data paste of more than one line needs the second \r unless it ends in a newline (not only an indented last line); the event flag bits (1 builtin, 2 expansion, 4 filename, 8 chorded, with its two records) and what writing back each record kind does; why a new Tty types ls; and the sam box's N+1 for text without a final newline (out of range). Co-Authored-By: Claude Opus 5.5 --- .agents/skills/pardes-9p/SKILL.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to '.agents/skills') diff --git a/.agents/skills/pardes-9p/SKILL.md b/.agents/skills/pardes-9p/SKILL.md index f0ae51e4..c9b1be23 100644 --- a/.agents/skills/pardes-9p/SKILL.md +++ b/.agents/skills/pardes-9p/SKILL.md @@ -181,9 +181,10 @@ command pane shows `exit ?` and does not run again, and REPLs are unbound. Multi written to `pty/data` should be a bracketed paste, `\e[200~\e[201~`, then, in a separate write once the REPL has echoed the paste (Python 3.13+ takes a `\r` read with the paste as part of it, even for one line), `\r`. -End the pasted code with a newline and that one `\r` runs it; without one, a -code whose last line is indented (a `def` or `for` body) needs a second -`\r`, as one Enter leaves such a block open. Sent line by line, a blank line ends a Python block, and Python +A paste of one line needs that one `\r`; a paste of more than one line +needs a second `\r` unless the pasted code ends in a newline (one Enter +leaves a multi-line input at `...`). A middle click, or an event +write-back, sends what it needs by itself. Sent line by line, a blank line ends a Python block, and Python 3.14's REPL auto-indents each line it is typed. Every refused 9P write adds an `err : ` record to `$m/log`; through a mount the write itself only says `Invalid argument`. @@ -218,8 +219,9 @@ env printf 'Edit ,x/foo/{\ni//\n}\n' > $pane/ctl > **sam gotchas** (as sam does them, pardes too) > - `$-1` is the last line when the text ends in a newline (`a\nb\n`: `b\n`), > but the one before it when it does not (`a\nb`: `$` is on `b`, so `a\n`). -> - A line past the end is the empty line there, not an error: `N+1` at the -> last line is `#,#`; only the line after that is out of range. +> - With a final newline, the line after the last is the empty place at the +> end, not an error: `N+1` at the last line is `#,#`. Without one +> (`a\nb`), the last line runs to the end and `N+1` is out of range. > - `^` and `$` match at the text's end too: `/^/` from the end finds the > empty place after a final newline. > - `2,1` is no error: it is `#,#`, an empty range at -- cgit v1.3