const std = @import("std"); const Allocator = std.mem.Allocator; const types = @import("./lib/types.zig"); const CommandStatus = types.CommandStatus; const CommandContext = types.CommandContext; pub const Cls = struct { pub fn eval(cls: Cls, ctx: CommandContext) !CommandStatus { _ = cls; // Clear screen - only works when going to stdout, not when redirected switch (ctx.output_writer) { .stdout => |writer| { try writer.write("\x1B[2J\x1B[H"); }, .capture => { // Do nothing when output is captured/redirected }, } return CommandStatus{ .Code = 0 }; } };