From c44894f53decbacc68c0e4e9d1118fc082bc63a0 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 10:02:33 -0300 Subject: A ctl write fails when a builtin it runs fails, and a missing required argument is refused before anything runs A ctl write failed only on a malformed line: Mount x reported its error in the editor while the write succeeded, and a bare Mount failed only as it ran, after earlier lines of the write. acme's ctl answers a command's error (editors/acme/xfid.c:700). Builtins now declare requires_arg beside takes_arg (settings: those with a value to set), and the check refuses a bare one as wrong #args before any line runs; while a ctl runs, the first error a builtin reports fails the write, quoted with its line, and the prompt refusal quotes its line too. Docs say what a failure mid-write leaves done. Co-Authored-By: Claude Opus 5.5 --- .agents/skills/pardes-9p/SKILL.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to '.agents') diff --git a/.agents/skills/pardes-9p/SKILL.md b/.agents/skills/pardes-9p/SKILL.md index ec5f811f..a17a5dac 100644 --- a/.agents/skills/pardes-9p/SKILL.md +++ b/.agents/skills/pardes-9p/SKILL.md @@ -138,9 +138,11 @@ width, then `current` or `notcurrent` — and takes `get` (reload from disk), `lock`/`unlock`, and any builtin that acts on a pane (`Del`, `Save f`, `Collapse`). Session builtins and settings go to the root `ctl`, which reads back every setting in the syntax it takes. A ctl write is checked whole -first and refused as `unknown control message "X"` (EINVAL) and the like; a -builtin that would open a prompt (`Save` on a scratch, bare `Find`) fails -there instead of prompting. The lock binds only clients that take it, and is held by the +first and refused as `unknown control message "X"` (EINVAL) and the like, +a required argument missing included (`wrong #args ... "Mount"`); then a line +whose builtin reports an error fails the write with that error and the line +(EIO), after the lines before it took effect. A `Save` on a scratch fails +rather than prompt. The lock binds only clients that take it, and is held by the open that wrote it, so a shell holds an fd across the edit: `exec 3>$pane/ctl; echo lock >&3; ...; exec 3>&-`. -- cgit v1.3