Add FreeBSD support

Following 7aeadb06ee
This commit is contained in:
-k
2025-06-12 21:15:11 -04:00
committed by Mitchell Hashimoto
parent 6fe72db0c4
commit e09657e263
9 changed files with 32 additions and 23 deletions

View File

@@ -2817,7 +2817,7 @@ pub fn loadCliArgs(self: *Config, alloc_gpa: Allocator) !void {
.windows => {},
// Fast-path if we are Linux and have no args.
.linux => if (std.os.argv.len <= 1) return,
.linux, .freebsd => if (std.os.argv.len <= 1) return,
// Everything else we have to at least try because it may
// not use std.os.argv.
@@ -2835,7 +2835,7 @@ pub fn loadCliArgs(self: *Config, alloc_gpa: Allocator) !void {
// styling, etc. based on the command.
//
// See: https://github.com/Vladimir-csp/xdg-terminal-exec
if (comptime builtin.os.tag == .linux) {
if ((comptime builtin.os.tag == .linux) or (comptime builtin.os.tag == .freebsd)) {
if (internal_os.xdg.parseTerminalExec(std.os.argv)) |args| {
const arena_alloc = self._arena.?.allocator();