aboutsummaryrefslogtreecommitdiff
path: root/binaries.old/wipe/wipe.zig
blob: 6cc82a22ecdb9ddf831225daa137b52aeb3220ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//! wipe - Clear the terminal screen

const colors = @import("colors");
const format = @import("format");
const io = @import("io");
const params = @import("params");
const sys = @import("sys");

export fn main(pc: u32, pv: [*]const [*:0]const u8) u8 {
    const p = params.parse(pc, pv) catch return 1;

    if (p.positionals.len > 0) {
        format.colorln("wipe: positional parameters are not supported.", colors.red);
        return 1;
    }

    if (p.named.len > 0) {
        format.colorln("wipe: named parameters are not supported.", colors.red);
        return 1;
    }

    io.wipe();
    return 0;
}