Add -h alias for --help

This commit is contained in:
Guoxin Yin 2020-11-09 02:48:17 +08:00 committed by Andrew Kelley
parent 51ffb0548d
commit 4d44a813de

View File

@ -2078,7 +2078,7 @@ pub fn cmdInit(
while (i < args.len) : (i += 1) {
const arg = args[i];
if (mem.startsWith(u8, arg, "-")) {
if (mem.eql(u8, arg, "--help")) {
if (mem.eql(u8, arg, "-h") or mem.eql(u8, arg, "--help")) {
try io.getStdOut().writeAll(usage_init);
return cleanExit();
} else {