Skip to content

Commit

Permalink
Add short help flag to benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
nvzqz committed Nov 26, 2016
1 parent b1c36c5 commit 2ecb8e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/benchmark/Help.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func printHelpAndExit() -> Never {
message += "\n"
message += ss("Flags:") + "\n"
message += "\n"
message += " " + sf("--help") + " Print this help message\n"
message += " " + sf("--help, -h") + " Print this help message\n"
message += " " + sf("--no-color") + " Output no color\n"
message += "\n"
message += " " + sf("--count, -c") + " " + sa("COUNT") + " The number of times to benchmark (default: 10000000)\n"
Expand Down
2 changes: 1 addition & 1 deletion Sources/benchmark/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func hasArgs() -> Bool {

let styleOutput = !contains("--no-color")

if !hasArgs() || contains("--help") {
if !hasArgs() || contains("--help") || contains("-h") {
printHelpAndExit()
}

Expand Down

0 comments on commit 2ecb8e0

Please sign in to comment.