| ... | @@ -41,11 +41,11 @@ const usage = | ... | @@ -41,11 +41,11 @@ const usage = |
| 41 | \\ build Build project from build.zig | 41 | \\ build Build project from build.zig |
| 42 | \\ build-exe Create executable from source or object files | 42 | \\ build-exe Create executable from source or object files |
| 43 | \\ build-lib Create library from source or object files | 43 | \\ build-lib Create library from source or object files |
| 44 | \\ build-obj Create object from source or assembly | 44 | \\ build-obj Create object from source or object files |
| 45 | \\ cc Use Zig as a drop-in C compiler | 45 | \\ cc Use Zig as a drop-in C compiler |
| 46 | \\ c++ Use Zig as a drop-in C++ compiler | 46 | \\ c++ Use Zig as a drop-in C++ compiler |
| 47 | \\ env Print lib path, std path, compiler id and version | 47 | \\ env Print lib path, std path, cache directory, and version |
| 48 | \\ fmt Parse file and render in canonical zig format | 48 | \\ fmt Reformat Zig source into canonical form |
| 49 | \\ init-exe Initialize a `zig build` application in the cwd | 49 | \\ init-exe Initialize a `zig build` application in the cwd |
| 50 | \\ init-lib Initialize a `zig build` library in the cwd | 50 | \\ init-lib Initialize a `zig build` library in the cwd |
| 51 | \\ libc Display native libc paths file or validate one | 51 | \\ libc Display native libc paths file or validate one |
| ... | @@ -54,11 +54,11 @@ const usage = | ... | @@ -54,11 +54,11 @@ const usage = |
| 54 | \\ targets List available compilation targets | 54 | \\ targets List available compilation targets |
| 55 | \\ test Create and run a test build | 55 | \\ test Create and run a test build |
| 56 | \\ version Print version number and exit | 56 | \\ version Print version number and exit |
| 57 | \\ zen Print zen of zig and exit | 57 | \\ zen Print Zen of Zig and exit |
| 58 | \\ | 58 | \\ |
| 59 | \\General Options: | 59 | \\General Options: |
| 60 | \\ | 60 | \\ |
| 61 | \\ --help Print command-specific usage | 61 | \\ -h, --help Print command-specific usage |
| 62 | \\ | 62 | \\ |
| 63 | ; | 63 | ; |
| 64 | | 64 | |
| ... | @@ -2017,7 +2017,7 @@ pub fn cmdLibC(gpa: *Allocator, args: []const []const u8) !void { | ... | @@ -2017,7 +2017,7 @@ pub fn cmdLibC(gpa: *Allocator, args: []const []const u8) !void { |
| 2017 | while (i < args.len) : (i += 1) { | 2017 | while (i < args.len) : (i += 1) { |
| 2018 | const arg = args[i]; | 2018 | const arg = args[i]; |
| 2019 | if (mem.startsWith(u8, arg, "-")) { | 2019 | if (mem.startsWith(u8, arg, "-")) { |
| 2020 | if (mem.eql(u8, arg, "--help")) { | 2020 | if (mem.eql(u8, arg, "-h") or mem.eql(u8, arg, "--help")) { |
| 2021 | const stdout = io.getStdOut().writer(); | 2021 | const stdout = io.getStdOut().writer(); |
| 2022 | try stdout.writeAll(usage_libc); | 2022 | try stdout.writeAll(usage_libc); |
| 2023 | return cleanExit(); | 2023 | return cleanExit(); |
| ... | @@ -2059,7 +2059,7 @@ pub const usage_init = | ... | @@ -2059,7 +2059,7 @@ pub const usage_init = |
| 2059 | \\ directory. | 2059 | \\ directory. |
| 2060 | \\ | 2060 | \\ |
| 2061 | \\Options: | 2061 | \\Options: |
| 2062 | \\ --help Print this help and exit | 2062 | \\ -h, --help Print this help and exit |
| 2063 | \\ | 2063 | \\ |
| 2064 | \\ | 2064 | \\ |
| 2065 | ; | 2065 | ; |
| ... | @@ -2148,7 +2148,7 @@ pub const usage_build = | ... | @@ -2148,7 +2148,7 @@ pub const usage_build = |
| 2148 | \\ Build a project from build.zig. | 2148 | \\ Build a project from build.zig. |
| 2149 | \\ | 2149 | \\ |
| 2150 | \\Options: | 2150 | \\Options: |
| 2151 | \\ --help Print this help and exit | 2151 | \\ -h, --help Print this help and exit |
| 2152 | \\ | 2152 | \\ |
| 2153 | \\ | 2153 | \\ |
| 2154 | ; | 2154 | ; |
| ... | @@ -2400,7 +2400,7 @@ pub const usage_fmt = | ... | @@ -2400,7 +2400,7 @@ pub const usage_fmt = |
| 2400 | \\ recursively. | 2400 | \\ recursively. |
| 2401 | \\ | 2401 | \\ |
| 2402 | \\Options: | 2402 | \\Options: |
| 2403 | \\ --help Print this help and exit | 2403 | \\ -h, --help Print this help and exit |
| 2404 | \\ --color [auto|off|on] Enable or disable colored error messages | 2404 | \\ --color [auto|off|on] Enable or disable colored error messages |
| 2405 | \\ --stdin Format code from stdin; output to stdout | 2405 | \\ --stdin Format code from stdin; output to stdout |
| 2406 | \\ --check List non-conforming files and exit with an error | 2406 | \\ --check List non-conforming files and exit with an error |
| ... | @@ -2432,7 +2432,7 @@ pub fn cmdFmt(gpa: *Allocator, args: []const []const u8) !void { | ... | @@ -2432,7 +2432,7 @@ pub fn cmdFmt(gpa: *Allocator, args: []const []const u8) !void { |
| 2432 | while (i < args.len) : (i += 1) { | 2432 | while (i < args.len) : (i += 1) { |
| 2433 | const arg = args[i]; | 2433 | const arg = args[i]; |
| 2434 | if (mem.startsWith(u8, arg, "-")) { | 2434 | if (mem.startsWith(u8, arg, "-")) { |
| 2435 | if (mem.eql(u8, arg, "--help")) { | 2435 | if (mem.eql(u8, arg, "-h") or mem.eql(u8, arg, "--help")) { |
| 2436 | const stdout = io.getStdOut().outStream(); | 2436 | const stdout = io.getStdOut().outStream(); |
| 2437 | try stdout.writeAll(usage_fmt); | 2437 | try stdout.writeAll(usage_fmt); |
| 2438 | return cleanExit(); | 2438 | return cleanExit(); |