From c48d374e1070c264325f40645eda7117bd774bed Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 16 Aug 2025 10:15:19 +0200 Subject: DIR: Add /? flag. --- src/cmd.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/cmd.zig') diff --git a/src/cmd.zig b/src/cmd.zig index 7723e6b..755e659 100644 --- a/src/cmd.zig +++ b/src/cmd.zig @@ -26,6 +26,7 @@ const Date = @import("cmd/date.zig").Date; const Time = @import("cmd/time.zig").Time; const Sort = @import("cmd/sort.zig").Sort; const Move = @import("cmd/move.zig").Move; +const Help = @import("cmd/help.zig").Help; const External = @import("cmd/external.zig").External; const RedirectCommand = @import("cmd/redirect.zig").RedirectCommand; const PipeCommand = @import("cmd/pipe.zig").PipeCommand; @@ -99,7 +100,7 @@ pub const BuiltinCommand = union(enum) { Dosshell, Edit, Fasthelp, - Help, + Help: Help, Join, Mem, Power, @@ -215,6 +216,11 @@ pub const Command = union(enum) { allocator.free(set.value); }, .Rem => |rem| allocator.free(rem.message), + .Help => |help| { + if (help.command) |cmd| { + allocator.free(cmd); + } + }, .Rename => |rename| { switch (rename.from) { .Path => |path| allocator.free(path), -- cgit v1.2.1