From 0e2afeecf6b8c0e9ac81da51f5f8c23a5be1a5ae Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 16:52:18 -0300 Subject: Errors are said in words, and a refusal names what it takes A failure read `Del k|j: InvalidArgument`, `Kill: NoSuchCommand`, `ill-formed control message`, or nothing at all. reportError now spells an error's name as words, and the refusals name their accepted forms: pty/ctl lists its verbs, a flag file takes 1 or 0, a setting word takes on or off, Del takes k, j or nothing, Repl takes - or a language. Kill with nothing to stop says so, /focus says pane, a Look that found nothing says no match, and pty/run on a command pane says it is not a shell. A ctl write's failure has room for the Repl list and is cut between words, the Repl word at a character. Co-Authored-By: Claude Opus 5.5 --- src/fs.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/fs.zig') diff --git a/src/fs.zig b/src/fs.zig index 0b620c9f..b2e2751d 100644 --- a/src/fs.zig +++ b/src/fs.zig @@ -1261,11 +1261,11 @@ pub const Namespace = struct { /// ctl answers a command's error (editors/acme/xfid.c:700). no_prompt: bool = false, refused: bool = false, - failure: [96]u8 = undefined, - failure_len: u8 = 0, + failure: [256]u8 = undefined, + failure_len: u16 = 0, /// A refusal that quotes the message it refuses, as Plan 9's cmderror /// does (kernel/misc/parse.c:82); answered at once (src/9p_io.zig). - ename: [128]u8 = undefined, + ename: [320]u8 = undefined, /// Something a held read may be waiting on changed since they were last /// answered: a record queued, a run answered, a pane gone. news: bool = false, -- cgit v1.3