From ff161c1200e57f10bfc5d5b7dc6fc573967b9303 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 30 Sep 2026 11:52:56 -0300 Subject: acme's Tab, Indent, Local, Incl and Abort are refused as acme words pardes has not, never run as shell commands The five were missing from the refused list, so at an exec or a ctl a typed `Indent on` fell through to the shell as a command named Indent. pardes has no equivalent for any of them: its tabs and indentation follow the file, commands always run in the pane's directory, and there is no include path or abort. They now get the same "invalid: acme's X is not a pardes builtin" as Zerox or Send. Co-Authored-By: Claude Opus 5.5 --- src/exec.zig | 5 +++++ src/ninep/ctl.zig | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/exec.zig b/src/exec.zig index 5b0b0250..eed9297a 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -828,6 +828,11 @@ pub const acme_words = [_]struct { acme: []const u8, pardes: ?[]const u8, hint: .{ .acme = "Load", .pardes = null, .hint = ": Restore loads a dump" }, .{ .acme = "ID", .pardes = null }, .{ .acme = "Send", .pardes = null }, + .{ .acme = "Tab", .pardes = null }, + .{ .acme = "Indent", .pardes = null }, + .{ .acme = "Local", .pardes = null }, + .{ .acme = "Incl", .pardes = null }, + .{ .acme = "Abort", .pardes = null }, }; pub fn executeBuiltinLine(p: *Pardes, id: usize, txt: []const u8) bool { diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index d86d6047..98980f2c 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -2439,7 +2439,7 @@ test "acme's words run as pardes's (Put is Save, Delete a Del that does not ask) const p = try withFile(testing.allocator, "x\n"); defer p.deinit(); const serial = serialOf(p); - for ([_][]const u8{ "Snarf\n", "Putall\n", "Zerox\n", "Get\n" }) |line| { + for ([_][]const u8{ "Snarf\n", "Putall\n", "Zerox\n", "Get\n", "Tab\n", "Indent\n", "Local\n", "Incl\n", "Abort\n" }) |line| { for ([_]u64{ Node.of(serial, .ctl), Node.of(serial, .exec) }) |node| { const r = wr(p, node, line); try testing.expectEqual(E.INVAL, r.errno()); -- cgit v1.3