mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-01-06 13:27:49 +00:00
cli: handle "-e" as the command to execute
This commit is contained in:
@@ -64,6 +64,11 @@ pub fn parse(comptime T: type, alloc: Allocator, dst: *T, iter: anytype) !void {
|
||||
};
|
||||
|
||||
while (iter.next()) |arg| {
|
||||
// Do manual parsing if we have a hook for it.
|
||||
if (@hasDecl(T, "parseManuallyHook")) {
|
||||
if (!try dst.parseManuallyHook(arena_alloc, arg, iter)) return;
|
||||
}
|
||||
|
||||
if (mem.startsWith(u8, arg, "--")) {
|
||||
var key: []const u8 = arg[2..];
|
||||
const value: ?[]const u8 = value: {
|
||||
|
||||
Reference in New Issue
Block a user