fix: use open -t to open text editor

This commit is contained in:
Dacheng Gao
2024-12-27 17:18:50 +08:00
parent a8e5eef11c
commit cb9cdc589b

View File

@ -12,7 +12,7 @@ pub fn open(alloc: Allocator, url: []const u8) !void {
// the process to exit to collect stderr.
const argv, const wait = switch (builtin.os.tag) {
.linux => .{ &.{ "xdg-open", url }, false },
.macos => .{ &.{ "open", url }, true },
.macos => .{ &.{ "open -t", url }, true },
.windows => .{ &.{ "rundll32", "url.dll,FileProtocolHandler", url }, false },
.ios => return error.Unimplemented,
else => @compileError("unsupported OS"),