diff options
Diffstat (limited to 'core/ninep')
| -rw-r--r-- | core/ninep/ctl.zig | 8 | ||||
| -rw-r--r-- | core/ninep/pane.zig | 2 | ||||
| -rw-r--r-- | core/ninep/pty.zig | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/core/ninep/ctl.zig b/core/ninep/ctl.zig index 2b26c3e2..81600582 100644 --- a/core/ninep/ctl.zig +++ b/core/ninep/ctl.zig @@ -571,7 +571,7 @@ fn checkBuiltin(p: *Pardes, req: Req, line: []const u8, scope: builtins.Scope) ? .callstack_depth => arg.len == 0 or (std.fmt.parseInt(u8, arg, 10) catch 0) -% 1 < pardes.lsp.callstack_max_depth, else => probe: { var probe = p.settings; - break :probe probe.apply(setting, if (arg.len > 0) arg else null); + break :probe probe.apply(setting, if (arg.len > 0) arg else null, p.sessionHome()); }, }; if (takes) return null; @@ -638,7 +638,7 @@ fn writeSettingsFor(p: *Pardes, s: *const config.Runtime, w: *std.Io.Writer, cap .locations = located.buffered(), .theme_name = p.theme().name, .theme_file = pardes.colors.loadedThemeFile(p), - .compiled_default_shell = config.defaultShell(), + .compiled_default_shell = p.sessionShell(), .default_dump_dir = pardes.dump.defaultDirectory(&dump_dir) orelse "", .capabilities = caps, .state = s, @@ -669,7 +669,7 @@ pub fn writePager(p: *Pardes, req: Req) Reply { // `~` is home, and `/tmp/../etc` is `/etc`: the +Pager is named in the // directory it is, as any other pane's name is. var home_buf: [4096]u8 = undefined; - const typed = pardes.filesystem.expandHome(std.mem.trim(u8, line, " \t"), &home_buf); + const typed = p.expandHome(std.mem.trim(u8, line, " \t"), &home_buf); const dir = if (typed.len > 0 and typed[0] == '/') std.Io.Dir.path.resolvePosix(p.scratch.allocator(), &.{typed}) catch typed else typed; // A directory that is there, or none (the session's): never a +Pager // named into one missing, nor a relative one quietly taken for none. @@ -1771,7 +1771,7 @@ test "after a ThemeFile the root ctl and DumpConfig say ThemeFile and its path, .platform = @tagName(pardes.platform), .theme_name = p.theme().name, .theme_file = pardes.colors.loadedThemeFile(p), - .compiled_default_shell = config.defaultShell(), + .compiled_default_shell = p.sessionShell(), .hover_delay_frames = config.look_preview_delay_frames, .native_images = false, .capabilities = builtins.capabilities, diff --git a/core/ninep/pane.zig b/core/ninep/pane.zig index b940bdd6..16d7762a 100644 --- a/core/ninep/pane.zig +++ b/core/ninep/pane.zig @@ -894,7 +894,7 @@ fn writeName(p: *Pardes, req: Req, id: usize, pane: *Pane) Reply { // Words 9ns maps to EINVAL, as every refusal of a name here. if (fileOf(pane) == null) return tree.failText(req.tag, E.INVAL, unnamed(pane)); var home_buf: [4096]u8 = undefined; - const full = std.Io.Dir.path.resolvePosix(p.scratch.allocator(), &.{ pardes.Pardes.paneDir(pane), fs.expandHome(name, &home_buf) }) catch + const full = std.Io.Dir.path.resolvePosix(p.scratch.allocator(), &.{ pardes.Pardes.paneDir(pane), p.expandHome(name, &home_buf) }) catch return Reply.fail(req.tag, E.NOMEM); if (!std.Io.Dir.path.isAbsolute(full) or full.len >= 4096) return tree.failText(req.tag, E.INVAL, "invalid file name: longer than a path may be"); // A directory (`~`, `/`, `foo/`) is no file to name a pane after: a diff --git a/core/ninep/pty.zig b/core/ninep/pty.zig index a66d9f23..0fd75aa2 100644 --- a/core/ninep/pty.zig +++ b/core/ninep/pty.zig @@ -66,7 +66,7 @@ pub fn writeCtl(p: *Pardes, req: Req, id: usize) Reply { // interpreter is not: refused, and the running shell kept. const bin = pane.shell orelse p.shellBin(); var why: [320]u8 = undefined; - if (pardes.tape.value(.shell, @import("dev").host_io.Shell.refusal, .{ bin[0..@min(bin.len, 200)], &why })) |refused| + if (pardes.tape.site(.shell, null, @import("dev").host_io.Shell.refusal, .{ bin[0..@min(bin.len, 200)], &why })) |refused| return tree.failText(req.tag, E.NOENT, std.fmt.bufPrint(&p.fs.ename, "exec: {s}", .{refused[0..@min(refused.len, 300)]}) catch &p.fs.ename); // cut to ename's 320 }; if (verb(p, id, line, apply)) |why| return tree.failText(req.tag, E.INVAL, why); |
