diff --git a/build.zig b/build.zig index e532c75..e70fcbd 100644 --- a/build.zig +++ b/build.zig @@ -10,6 +10,7 @@ pub fn build(b: *std.Build) void { .target = target, .optimize = optimize, }); + exe.linkLibC(); b.installArtifact(exe); diff --git a/src/main.zig b/src/main.zig index 29d74b9..b2e4ed4 100644 --- a/src/main.zig +++ b/src/main.zig @@ -22,7 +22,8 @@ pub fn main() !void { const stdout = std.io.getStdOut(); if (args.len == 1) { - try Install.init(a, &.{}); + try Zup.help(); + try stderr.writeAll("\x1B[38;5;9merror: Missing command\x1B[38;5;0m\n\n"); } else if (std.mem.eql(u8, args[1], "install")) { try Install.init(a, args[2..]); } else if (std.mem.eql(u8, args[1], "list")) { @@ -34,7 +35,7 @@ pub fn main() !void { try Zup.help(); } else { try Zup.help(); - try stderr.writeAll("\x1B[38;5;9mUnknown command: "); + try stderr.writeAll("\x1B[38;5;9merror: Unknown command: "); try stderr.writeAll(args[1]); try stderr.writeAll("\x1B[38;5;0m\n\n"); } diff --git a/src/zup.zig b/src/zup.zig index 39dc512..329bd62 100644 --- a/src/zup.zig +++ b/src/zup.zig @@ -10,7 +10,7 @@ pub fn help() !void { \\ install (default) Download and install Zig and ZLS versions \\ list List all downloaded Zig and ZLS versions \\ - \\General options: + \\Options: \\ -v, --version Print version of Zup \\ -h, --help Print command-specific usage \\