summaryrefslogtreecommitdiff
path: root/core/exec.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/exec.zig')
-rw-r--r--core/exec.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/exec.zig b/core/exec.zig
index 6804a22e..5a9bf192 100644
--- a/core/exec.zig
+++ b/core/exec.zig
@@ -333,7 +333,7 @@ pub fn saveTo(p: *Pardes, id: usize, path: []const u8) void {
var home_buf: [4096]u8 = undefined;
const full = std.Io.Dir.path.resolvePosix(
p.scratch.allocator(),
- &.{ Pardes.paneDir(pane), @import("fs.zig").expandHome(path, &home_buf) },
+ &.{ Pardes.paneDir(pane), p.expandHome(path, &home_buf) },
) catch |err| return p.reportError(id, "save", err);
if (!std.Io.Dir.path.isAbsolute(full)) return p.reportError(id, "save", error.NoDirectory);
if (full.len > Pardes.SavePath.cap) return p.reportError(id, "save", error.PathTooLong);
@@ -1022,25 +1022,25 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Runtime.Setting, arg: ?[]
p.settings.shell.pending = true;
if (!p.announce) return;
var said: pardes.Kind.Buf(320) = .{};
- return p.setMessage(v.active, said.print("Shell: the default again, {s} ($SHELL, else /bin/sh)", .{config.defaultShell()[0..@min(config.defaultShell().len, 256)]}));
+ return p.setMessage(v.active, said.print("Shell: the default again, {s} ($SHELL, else /bin/sh)", .{p.sessionShell()[0..@min(p.sessionShell().len, 256)]}));
}
var why: [320]u8 = undefined;
- if (pardes.tape.value(.shell, @import("dev").host_io.Shell.refusal, .{ want[0..@min(want.len, 200)], &why })) |refused| {
+ if (pardes.tape.site(.shell, null, @import("dev").host_io.Shell.refusal, .{ want[0..@min(want.len, 200)], &why })) |refused| {
var text: pardes.Kind.Buf(340) = .{};
return p.reportFailure(v.active, text.print("Shell: {s}", .{refused}));
}
- if (!p.settings.apply(setting, want)) p.reportFailure(v.active, "Shell: takes " ++ comptime config.Runtime.takes(.shell).?);
+ if (!p.settings.apply(setting, want, p.sessionHome())) p.reportFailure(v.active, "Shell: takes " ++ comptime config.Runtime.takes(.shell).?);
},
// Bare, each says its value, as acme's Tab says the width.
inline .tab, .callstack_depth => |_, tag| if (arg == null) {
var said: pardes.Kind.Buf(40) = .{};
return p.setMessage(v.active, said.print("{s} {d}", .{ setting.word, @field(p.settings, @tagName(tag)) }));
- } else if (!p.settings.apply(setting, arg)) {
+ } else if (!p.settings.apply(setting, arg, p.sessionHome())) {
var said: pardes.Kind.Buf(96) = .{};
p.reportFailure(v.active, said.print("{s}{s}: takes {s}", .{ setting.word, if (tag == .tab) ": invalid tab width" else "", comptime config.Runtime.takes(tag).? }));
},
// Said with what it takes: its words, its range.
- else => if (!p.settings.apply(setting, arg)) {
+ else => if (!p.settings.apply(setting, arg, p.sessionHome())) {
var buf: [160]u8 = undefined;
var text: std.Io.Writer = .fixed(&buf);
// A list of values too long for the row is cut.