summaryrefslogtreecommitdiff
path: root/src/cmd/ver.zig
blob: 5e99c03b8b2baee75d10f7ec9f721b67d8536422 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const std = @import("std");
const Allocator = std.mem.Allocator;
const print = std.debug.print;

const types = @import("./lib/types.zig");
const CommandStatus = types.CommandStatus;
const CommandContext = types.CommandContext;

pub const Ver = struct {
    pub fn eval(ver: Ver, ctx: CommandContext) !CommandStatus {
        _ = ver;

        const output = "MB-DOSE Version 6.22\n";
        if (ctx.output_capture) |capture| {
            try capture.write(output);
        } else {
            print("{s}", .{output});
        }
        return CommandStatus{ .Code = 0 };
    }
};