summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 14:06:59 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit7cf2c9947ce0a5529b15835b7e1eecb30a2e68c2 (patch)
tree89262d1019246f4cff2cf1f5e0c80b927911a548
parentf8c325283fe87dd981babd2a132e58eb393924a1 (diff)
downloadpardes-7cf2c9947ce0a5529b15835b7e1eecb30a2e68c2.tar.gz
pardes-7cf2c9947ce0a5529b15835b7e1eecb30a2e68c2.zip
Not-found failures say it once, in plain words: grep: pattern not found, callers not found
The ENOENT that 9ns reads from a failure's words came from a tacked-on suffix, grep: no match, not found, definition: nothing found, not found, no shell "x", not found. They now say it once: grep: pattern not found, find: name not found, Callers: callers not found, definition: not found, shell "x" not found (...). Co-Authored-By: Claude Opus 5.5 <[email protected]>
-rw-r--r--docs/config.md2
-rw-r--r--docs/fs.md4
-rw-r--r--src/builtins.zig4
-rw-r--r--src/host_io.zig4
-rw-r--r--src/ninep/ctl.zig10
-rw-r--r--src/pardes.zig10
-rw-r--r--test/fs.py4
-rw-r--r--test/snapshots/lsp.golden2
-rw-r--r--test/snapshots/shellset.golden2
9 files changed, 21 insertions, 21 deletions
diff --git a/docs/config.md b/docs/config.md
index b5ec1aa5..1af696be 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -49,7 +49,7 @@ opens the file. Shell follows the same requested/effective/pending model as
Font. `Default shell` is the one used while no `Shell` is set: `$SHELL`, the
user's login shell, else `/bin/sh` (also when `$SHELL` names nothing
executable); an explicit `Shell` overrides it. `Shell <name or path>` is
-refused unless it names an executable file (`Shell: no shell "x" (...)`, or
+refused unless it names an executable file (`Shell: shell "x" not found (...)`, or
`Shell: not a shell: /etc is a directory`; a bare name is looked for in the
usual bin directories), as `Tty <shell>` is, and a
bare `Shell` goes back to the default. The root ctl reads `Shell <the one the
diff --git a/docs/fs.md b/docs/fs.md
index 4b772c18..b7d1d27e 100644
--- a/docs/fs.md
+++ b/docs/fs.md
@@ -258,7 +258,7 @@ back changes nothing; a setting the frontend cannot show (`Lift`,
(EINVAL: a request this build cannot take), and so is a builtin only the
GUI has (`Fonts`), written to an `exec` too, where it would otherwise run as
a shell command; a `Shell` or `Tty` naming no
-shell says `no shell "x", not found` (ENOENT); a `DumpDir` whose last
+shell says `shell "x" not found` (ENOENT); a `DumpDir` whose last
directory is missing has it made at the Dump, and one further up missing
says `Dump <path>: no such directory` (ENOENT), one that is no directory
(`/dev/null`) `Dump /dev/null/pardes-<time>.zon: /dev/null is not a
@@ -773,7 +773,7 @@ name (ENOENT for a pane, file or directory gone -- `look .` from a pane
whose directory is gone says `look: <dir>: no such directory`, and a
`./zz.txt` or `../x` that is not there `look: ./zz.txt: no such file`, while a
plain `zz.txt` is looked for as text, a miss logged as any look's -- and for a
-Find or Grep that finds nothing, `grep: no match, not found`; Grep walks
+Find or Grep that finds nothing, `grep: pattern not found`; Grep walks
every pane's directory on this host, passing over panes of the served
tree (`/virtual/`, a peer's `/n/<name>/`) and directories not there,
so none of them spoils the rest; Find, Grep and a language server's lists
diff --git a/src/builtins.zig b/src/builtins.zig
index ec6afeae..9a49df16 100644
--- a/src/builtins.zig
+++ b/src/builtins.zig
@@ -1384,8 +1384,8 @@ pub const Mini = struct {
/// A Find or Grep that finds nothing fails as one, in words 9ns reads as
/// ENOENT (`not found`), the same for both.
-const e_search_miss_find = "find: no match, not found";
-const e_search_miss_grep = "grep: no match, not found";
+const e_search_miss_find = "find: name not found";
+const e_search_miss_grep = "grep: pattern not found";
/// List the files below this pane's directory whose names hold its argument, in a +Search.
pub const Find = struct {
diff --git a/src/host_io.zig b/src/host_io.zig
index bbd664a9..9e3fbf79 100644
--- a/src/host_io.zig
+++ b/src/host_io.zig
@@ -933,7 +933,7 @@ pub const Shell = struct {
if (libc.access(@ptrCast(&buf), 0) == 0) return std.fmt.bufPrint(said, "not a shell: {s} is not executable", .{bin}) catch "not a shell: not executable";
}
// "not found": the words a mount reads as ENOENT.
- return std.fmt.bufPrint(said, "no shell \"{s}\", not found (a name on the usual paths, or a path to one)", .{bin}) catch "no such shell";
+ return std.fmt.bufPrint(said, "shell \"{s}\" not found (a name on the usual paths, or a path to one)", .{bin}) catch "no such shell";
}
/// The program a script's `#!` line names, when it is not there to
@@ -970,7 +970,7 @@ pub const Shell = struct {
var said: [320]u8 = undefined;
try std.testing.expectEqualStrings("interpreter /no/such/interp not found", refusal(try std.fmt.bufPrint(&path, "{s}/bad", .{dir}), &said).?);
try std.testing.expect(refusal(try std.fmt.bufPrint(&path, "{s}/good", .{dir}), &said) == null);
- try std.testing.expect(std.mem.startsWith(u8, refusal(try std.fmt.bufPrint(&path, "{s}/none", .{dir}), &said).?, "no shell "));
+ try std.testing.expect(std.mem.startsWith(u8, refusal(try std.fmt.bufPrint(&path, "{s}/none", .{dir}), &said).?, "shell \""));
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "plain", .data = "echo\n" });
const plain = try std.fmt.bufPrint(&path, "{s}/plain", .{dir});
try std.testing.expect(std.mem.endsWith(u8, refusal(plain, &said).?, "plain is not executable"));
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig
index 2e6ed6db..256b94ad 100644
--- a/src/ninep/ctl.zig
+++ b/src/ninep/ctl.zig
@@ -1731,8 +1731,8 @@ test "Shell refuses a path that is no executable, and bare it goes back to the d
const root_ctl = @intFromEnum(tree.TopFile.ctl);
const refused = wr(p, root_ctl, "Shell /nonexistent/zzsh\n");
try testing.expectEqual(Status.err, refused.reply.status);
- try testing.expect(std.mem.indexOf(u8, refused.reply.ename, "Shell: no shell \"/nonexistent/zzsh\"") != null);
- try testing.expect(th.logHas(p, "no shell \"/nonexistent/zzsh\""));
+ try testing.expect(std.mem.indexOf(u8, refused.reply.ename, "Shell: shell \"/nonexistent/zzsh\" not found") != null);
+ try testing.expect(th.logHas(p, "shell \"/nonexistent/zzsh\" not found"));
try testing.expectEqual(E.IO, wr(p, root_ctl, "Shell /etc\n").errno());
try testing.expect(th.logHas(p, "Shell: not a shell: /etc is a directory"));
try testing.expectEqualStrings("", p.settings.shell.requested.get());
@@ -1922,10 +1922,10 @@ test "Grep with no hit says grep: no match and opens nothing, a missing pane dir
for (p.panes) |slot| count += @intFromBool(slot != null);
const missed = wr(p, Node.of(serialOf(p), .exec), "Grep zzqqnomatchzz\n");
try testing.expectEqual(E.NOENT, missed.errno());
- try testing.expectEqualStrings("grep: no match, not found", missed.reply.ename);
+ try testing.expectEqualStrings("grep: pattern not found", missed.reply.ename);
const unfound = wr(p, Node.of(serialOf(p), .exec), "Find zzqqnomatchzz\n");
try testing.expectEqual(E.NOENT, unfound.errno());
- try testing.expectEqualStrings("find: no match, not found", unfound.reply.ename);
+ try testing.expectEqualStrings("find: name not found", unfound.reply.ename);
var after: usize = 0;
for (p.panes) |slot| after += @intFromBool(slot != null);
try testing.expectEqual(count, after);
@@ -2096,7 +2096,7 @@ test "a language server question that finds nothing, cannot be answered, or is a
p.lspRequest(id, .incoming_calls, "");
try testing.expect(p.lsp_wait != null);
p.lspResponse(p.lsp_wait.?.id, "");
- try testing.expectEqualStrings("Callers: no callers, not found", p.fs.late_failure[0..p.fs.late_failure_len]);
+ try testing.expectEqualStrings("Callers: callers not found", p.fs.late_failure[0..p.fs.late_failure_len]);
// A backend that cannot answer says why.
p.fs.late_failure_len = 0;
p.lspRequest(id, .outgoing_calls, "");
diff --git a/src/pardes.zig b/src/pardes.zig
index 12acfbd6..1c65795a 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -1853,7 +1853,7 @@ test "Tty+fish, one word a tag can hold, opens a terminal on that shell" {
const caller = p.panes[0].?;
try std.testing.expect(p.executeBuiltinLine(0, "Tty /nonexistent"));
try std.testing.expect(p.active == before and caller.shell == null);
- try std.testing.expect(std.mem.indexOf(u8, caller.msg[0..caller.msg_len], "no shell \"/nonexistent\"") != null);
+ try std.testing.expect(std.mem.indexOf(u8, caller.msg[0..caller.msg_len], "shell \"/nonexistent\" not found") != null);
try std.testing.expect(p.executeBuiltinLine(0, "Tty fsh-not-a-shell"));
try std.testing.expect(caller.shell == null);
// A directory passes access(X_OK); it is no shell either.
@@ -6612,10 +6612,10 @@ pub const Pardes = struct {
const none: ?[]const u8 = switch (w.kind) {
.completion, .format, .rename => null,
.diagnostics, .workspace_diagnostics => return p.setMessage(w.pane, std.fmt.bufPrint(&said, "{s}: none", .{lspWord(w.kind)}) catch "none"),
- .incoming_calls => "no callers, not found",
- .outgoing_calls => "no callees, not found",
- .hover => "nothing to show, not found",
- else => "nothing found, not found",
+ .incoming_calls => "callers not found",
+ .outgoing_calls => "callees not found",
+ .hover => "nothing to show: not found",
+ else => "not found",
};
if (none) |text| p.reportFailure(w.pane, std.fmt.bufPrint(&said, "{s}: {s}", .{ lspWord(w.kind), text }) catch "nothing found");
return;
diff --git a/test/fs.py b/test/fs.py
index 8047273d..6a9e78f6 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -622,11 +622,11 @@ def workflow_canary(binary):
rows = client.read(f'/pane/{grep}/body').decode()
assert 'a.txt:2' in rows and 'b.txt:2' in rows, rows
client.remove(f'/pane/{grep}')
- execute_refused(client, a, 'Grep zzqqnomatch', 'grep: no match')
+ execute_refused(client, a, 'Grep zzqqnomatch', 'grep: pattern not found')
found = made_by(a, b'Find b.txt\n')
assert 'b.txt' in client.read(f'/pane/{found}/body').decode()
client.remove(f'/pane/{found}')
- execute_refused(client, a, 'Find zzqqnomatch', 'find: no match')
+ execute_refused(client, a, 'Find zzqqnomatch', 'find: name not found')
# A plain word looked at is found in the pane, after its dot.
client.write(f'/pane/{a}/dot', b' 0 0 ')
diff --git a/test/snapshots/lsp.golden b/test/snapshots/lsp.golden
index 2d3880f1..be0090fb 100644
--- a/test/snapshots/lsp.golden
+++ b/test/snapshots/lsp.golden
@@ -33,4 +33,4 @@
== snap step grid=120x41 cursor=15,3
|3: 1 const std = @import("std");
== snap nothing grid=120x41 cursor=7,5
-|3: 1 const std = @import("std"); definition: nothing found, not found
+|3: 1 const std = @import("std"); definition: not found
diff --git a/test/snapshots/shellset.golden b/test/snapshots/shellset.golden
index db72bfc8..0d13f017 100644
--- a/test/snapshots/shellset.golden
+++ b/test/snapshots/shellset.golden
@@ -4,7 +4,7 @@
| /tmp/pardes-snap/shellset/cwd/cmd.txt Save Tty Collapse Del
| 1 Shell zznosuchshell
== snap builtin-ran grid=90x21 cursor=25,3
-|3: hell: no shell "zznosuchshell", not found (a name on the usual paths, or a path to one)
+|3: Shell: shell "zznosuchshell" not found (a name on the usual paths, or a path to one)
== snap fallback-shell grid=90x21 cursor=49,6
|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
|2: /tmp/pardes-snap/shellset/cwd/cmd.txt Save /tmp/pardes-snap/shellset/cwd Tty+bash Sav