Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/Vaxis.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1490,13 +1490,10 @@ pub fn prettyPrint(self: *Vaxis, tty: *std.Io.Writer) !void {
}

/// Set the terminal's current working directory
pub fn setTerminalWorkingDirectory(_: *Vaxis, tty: *std.Io.Writer, path: []const u8) !void {
pub fn setTerminalWorkingDirectory(_: *Vaxis, tty: *std.Io.Writer, path: []const u8, hostname_: ?[]const u8) !void {
if (path.len == 0 or path[0] != '/')
return error.InvalidAbsolutePath;
const hostname = switch (builtin.os.tag) {
.windows => null,
else => std.posix.getenv("HOSTNAME"),
} orelse "localhost";
const hostname = hostname_ orelse "localhost";

const uri: std.Uri = .{
.scheme = "file",
Expand Down
Loading