summaryrefslogtreecommitdiff
path: root/src/look.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/look.zig')
-rw-r--r--src/look.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/look.zig b/src/look.zig
index 0f5103ba..19b320f9 100644
--- a/src/look.zig
+++ b/src/look.zig
@@ -1401,8 +1401,10 @@ fn lookUnresolved(p: *Pardes, id: usize, pane: *Pane, trimmed: []const u8, text:
var said: [4200]u8 = undefined;
const gone = if (comptime pardes.hosted) if (filesystem.localPath(dir)) |local| !exec.isDirectory(local) else false else true;
if (gone) return p.reportFailure(id, std.fmt.bufPrint(&said, "look: {s}: no such directory", .{dir[0..@min(dir.len, 4096)]}) catch "look: no such directory");
+ // A file not there is a miss, as `x` and `/abs/x` are: said and
+ // logged, the write answered with nothing.
var cut: [miss_path_cap + "…".len]u8 = undefined;
- return p.reportFailure(id, std.fmt.bufPrint(&said, "look: {s}: no such file", .{missText(trimmed, &cut)}) catch "look: no such file");
+ return missed(p, id, "{s}: no such file", .{missText(trimmed, &cut)});
}
// A raw terminal's clicks are its program's; a look written over
// 9P is no keyboard input, and searches whatever the key mode.