Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
at-grandpa committed Dec 25, 2018
1 parent 1bd927a commit 80e9f5a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ module FakeCrystalCommand
desc "Fake Crystal command."
usage "fcrystal [sub_command] [arguments]"
run do |opts, args|
puts opts.help # => help string.
puts opts.help_string # => help string.
end
sub "tool" do
desc "run a tool"
Expand Down Expand Up @@ -436,9 +436,11 @@ end

You can customize the help message. The `help_template` block needs to return `String`. Block arguments are `desc : String`, `usage : String`, `options : HelpOptionsType` and `sub_commands : HelpSubCommandsType`.

For example:
*help_template_test.cr*

```crystal
require "clim"
class MyCli < Clim
main do
help_template do |desc, usage, options, sub_commands|
Expand Down

0 comments on commit 80e9f5a

Please sign in to comment.