diff options
Diffstat (limited to 'core/builtins.zig')
| -rw-r--r-- | core/builtins.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/builtins.zig b/core/builtins.zig index 0d2e4c20..6b291628 100644 --- a/core/builtins.zig +++ b/core/builtins.zig @@ -664,7 +664,7 @@ pub const ThemeFile = struct { pub const requires_arg = true; pub fn run(c: Ctx) void { var home_buf: [4096]u8 = undefined; - const arg = pardes.filesystem.expandHome(std.mem.trim(u8, c.arg orelse return, " \t\r\n"), &home_buf); + const arg = c.p.expandHome(std.mem.trim(u8, c.arg orelse return, " \t\r\n"), &home_buf); // Said with why, not "invalid theme path". if (!std.mem.endsWith(u8, arg, ".zon")) { var said: pardes.Kind.Buf(320) = .{}; @@ -845,7 +845,7 @@ pub const Get = struct { } if (!panes.Output.fileTraits(f.output).saves) return c.p.reportFailure(c.id, "Get: only a file pane takes it"); var home_buf: [4096]u8 = undefined; - const path = if (typed.len == 0) c.pane.file.?.path else std.Io.Dir.path.resolvePosix(c.p.scratch.allocator(), &.{ Pardes.paneDir(c.pane), @import("fs.zig").expandHome(typed, &home_buf) }) catch |err| return c.p.reportError(c.id, "Get", err); + const path = if (typed.len == 0) c.pane.file.?.path else std.Io.Dir.path.resolvePosix(c.p.scratch.allocator(), &.{ Pardes.paneDir(c.pane), c.p.expandHome(typed, &home_buf) }) catch |err| return c.p.reportError(c.id, "Get", err); // A file that is not there, or a directory, is said before unsaved // edits are asked about: there would be nothing to load over them. if (typed.len > 0) if (@import("fs.zig").localPath(path)) |local| { @@ -908,7 +908,7 @@ pub const Incl = struct { if (dir_word[0] != '/' and dir_word[0] != '~') return p.reportFailure(c.id, said.print("Incl: invalid directory: {s} is relative", .{shown})); var home_buf: [4096]u8 = undefined; - const expanded = @import("fs.zig").expandHome(dir_word, &home_buf); + const expanded = p.expandHome(dir_word, &home_buf); if (@import("fs.zig").localPath(expanded)) |local| if (exec.kindOf(local) != .directory) return p.reportFailure(c.id, if (exec.kindOf(local) != null) said.print("Incl: not a directory: {s}", .{shown}) @@ -918,7 +918,7 @@ pub const Incl = struct { var words = std.mem.tokenizeAny(u8, typed, " \t"); while (words.next()) |dir_word| { var home_buf: [4096]u8 = undefined; - const full = std.Io.Dir.path.resolvePosix(p.scratch.allocator(), &.{ Pardes.paneDir(c.pane), @import("fs.zig").expandHome(dir_word, &home_buf) }) catch |err| return p.reportError(c.id, "Incl", err); + const full = std.Io.Dir.path.resolvePosix(p.scratch.allocator(), &.{ Pardes.paneDir(c.pane), p.expandHome(dir_word, &home_buf) }) catch |err| return p.reportError(c.id, "Incl", err); if (!std.Io.Dir.path.isAbsolute(full)) return p.reportFailure(c.id, "Incl: invalid directory"); for (p.incl.items) |dir| { if (std.mem.eql(u8, dir, full)) break; @@ -1182,7 +1182,7 @@ pub const Term = struct { if (arg.len > 0) { var why: [320]u8 = undefined; // The authority's lookup, taped, as Shell's (exec.zig). - if (pardes.tape.value(.shell, @import("dev").host_io.Shell.refusal, .{ arg[0..@min(arg.len, 200)], &why })) |refused| { + if (pardes.tape.site(.shell, null, @import("dev").host_io.Shell.refusal, .{ arg[0..@min(arg.len, 200)], &why })) |refused| { var said: pardes.Kind.Buf(340) = .{}; return c.p.reportFailure(c.id, said.print("Term: {s}", .{refused})); } |
