summary refs log tree commit diff homepage
path: root/src
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2023-03-05 03:05:52 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2023-03-05 03:05:52 +0900
commitaf8da8383d13e22b042ea90db48841ad39f43e96 (patch)
tree29700e2ee0ffcf437b8b476e3d39067cdc4489f6 /src
parent8a4a6b2d4a655cf4d23f5b94062b0eee005bb6f4 (diff)
downloadhybring-af8da8383d13e22b042ea90db48841ad39f43e96.tar.gz
Use GNU style for help
Diffstat (limited to 'src')
-rw-r--r--src/cli.cr10
1 files changed, 5 insertions, 5 deletions
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