def create_default_commands
command :help do |c|
c.syntax = 'rhc help <command>'
c.description = 'Display global or <command> help documentation.'
c.when_called do |args, options|
if args.empty?
say help_formatter.render
else
command = command args.join(' ')
begin
require_valid_command command
rescue InvalidCommandError => e
abort "#{e}"
end
help_bindings = CommandHelpBindings.new command, commands, Commander::Runner.instance.options
say help_formatter.render_command help_bindings
end
end
end
end