From af8da8383d13e22b042ea90db48841ad39f43e96 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Sun, 5 Mar 2023 03:05:52 +0900 Subject: Use GNU style for help --- src/cli.cr | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/cli.cr b/src/cli.cr index 5815c88..6f5412c 100644 --- a/src/cli.cr +++ b/src/cli.cr @@ -56,7 +56,7 @@ usage = "" config_path, port = nil, 8910 parser = OptionParser.new do |parser| - banner_prefix = "usage: #{Path[PROGRAM_NAME].basename}" + banner_prefix = "Usage: #{Path[PROGRAM_NAME].basename}" parser.banner = "#{banner_prefix} [subcommand] [arguments]" parser.on "serve", "start the HTTP server" do subcmd = Subcommand::Serve @@ -76,16 +76,16 @@ parser = OptionParser.new do |parser| end parser.invalid_option do |flag| - STDERR.puts "error: invalid option: #{flag}" + STDERR.puts "Error: Invalid option: #{flag}" subcmd = Subcommand::Usage end parser.missing_option do |flag| - STDERR.puts "error: missing argument for #{flag}" + STDERR.puts "Error: Missing argument for #{flag}" subcmd = Subcommand::Usage end parser.unknown_args do |before_dash, after_dash| next if before_dash.empty? && after_dash.empty? - STDERR << "error: unknown arguments:" + STDERR << "Error: Unknown arguments:" STDERR << " " << before_dash.join " " if !before_dash.empty? STDERR << " -- " << after_dash.join " " if !after_dash.empty? STDERR.puts @@ -103,7 +103,7 @@ cfg = case subcmd begin Configuration.new config_path.not_nil! rescue ex - STDERR.puts "error: failed to read config from #{config_path}: #{ex}" + STDERR.puts "Error: Failed to read config from #{config_path}: #{ex}" exit 1 end end -- cgit 1.4.1