diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 14:39:52 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | def16a1bc1c71d2fdcc7954e2ddec1384c2f05f7 (patch) | |
| tree | a84c6f05f83f12efdafb57bf9c091f840eb6e0e9 /src/pardes.zig | |
| parent | 0f18cc317190c2aaaf0efec4cd6da656cb1f3402 (diff) | |
| download | pardes-def16a1bc1c71d2fdcc7954e2ddec1384c2f05f7.tar.gz pardes-def16a1bc1c71d2fdcc7954e2ddec1384c2f05f7.zip | |
Only Tty reads Word+arg as its argument
Every builtin that takes an argument split a word at its first +, so
Dump+2024.zon ran Dump with 2024.zon. A builtin now opts in with plus_arg,
read by the registry, and only Tty does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 7863e272..74554e0d 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -1400,6 +1400,9 @@ test "Tty+fish, one word a tag can hold, opens a terminal on that shell" { try std.testing.expectEqualStrings("fish", p.panes[p.active].?.shell.?); p.acknowledgeShell(p.active, "/usr/bin/fish", true); try std.testing.expect(std.mem.startsWith(u8, tagline.curTail(p.panes[p.active].?), " Tty+fish ")); + // Only a word that says so splits at `+`: `Dump+x.zon` is no Dump. + try std.testing.expect(!p.executeBuiltinLine(0, "Dump+x.zon")); + try std.testing.expect(!p.executeBuiltinLine(0, "Msg+hello")); } test "a command pane shows how its command ended, and the next command there runs below it" { |
