diff options
author | zachir <zachir@librem.one> | 2024-03-06 23:35:31 -0600 |
---|---|---|
committer | zachir <zachir@librem.one> | 2024-03-06 23:35:31 -0600 |
commit | fc97dcfa00c2271a0df8be96df80ab7af864c0e8 (patch) | |
tree | f52399007d7066079592a6062694680e0ffae1cb | |
parent | e738c2a94247c67c2a77460e14877b7c44434694 (diff) |
-rw-r--r-- | src/main.zig | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/main.zig b/src/main.zig index e987bb0..c902202 100644 --- a/src/main.zig +++ b/src/main.zig @@ -123,26 +123,32 @@ pub fn main() anyerror!u8 { pub fn print_arg(err: u8) !u8 { return switch (err) { 0 => { - print("zeven: a simple binary to check if a number ", .{}); - print("is even or odd\n", .{}); - print("\tzeven [-cvh]\n", .{}); + print("zeven: a binary by ZachIR to check if ", .{}); + print("a number is even or odd\n", .{}); + print("\tzeven [-hcv]\n", .{}); print("\tzeven [--help]\n", .{}); print("\tzeven [--copyright]\n", .{}); print("\tzeven [--version]\n", .{}); - print("\tzeven [-q] [--quiet] X\n", .{}); + print("\tzeven [-q] [--quiet] NUMBER\n", .{}); + print("\t-h: prints this help message\n", .{}); + print("\t-c: prints the copyright information\n", .{}); + print("\t-v: prints the version\n", .{}); + print("\t-q: just uses error codes, no text\n", .{}); return 0; }, 1 => { - print("zeven is Free software under the {s} license.\n", .{LICENSE}); print("zeven copyright (c) Zachary Smith 2024\n", .{}); + print("zeven is Free software under the {s} ", .{LICENSE}); + print("license, and is provided without ", .{}); + print("warranty of any kind.\n", .{}); return 0; }, 2 => { - print("zeven version {s}\n", .{VERSION}); + print("zeven version {s}, 2024\n", .{VERSION}); return 0; }, else => { - print("Error!\n", .{}); + print("A bad argument was provided!\n", .{}); return 1; }, }; |