Sha256: b1f7506716640f1bf7717f67c92fbafe78a9b941ea00f7cfd54843148557586c

Contents?: true

Size: 1.1 KB

Versions: 6

Compression:

Stored size: 1.1 KB

Contents

  <%= HighLine.default_instance.color "NAME", :bold %>:

    <%= program :name %>

  <%= HighLine.default_instance.color "DESCRIPTION", :bold %>:

    <%= Commander::HelpFormatter.indent 4, program(:description) %>

  <%= HighLine.default_instance.color "COMMANDS", :bold %>:
<% for name, command in @commands.sort -%>
	<% unless alias? name %>
    <%= "%-#{max_command_length}s %s" % [command.name, command.summary || command.description] -%>
	<% end -%>
<% end %>
<% unless @aliases.empty? %>
  <%= HighLine.default_instance.color "ALIASES", :bold %>:
  <% for alias_name, args in @aliases.sort %>
    <%= "%-#{max_aliases_length}s %s %s" % [alias_name, command(alias_name).name, args.join(' ')] -%>
  <% end %>
<% end %>
<% unless @options.empty? -%>
  <%= HighLine.default_instance.color "GLOBAL OPTIONS", :bold %>:
	<% for option in @options -%>

    <%= option[:switches].join ', ' %>
        <%= option[:description] %>
	<% end -%>
<% end -%>
<% if program :help -%>
  <% for title, body in program(:help) %>
  <%= HighLine.default_instance.color title.to_s.upcase, :bold %>:

    <%= body %>
  <% end -%>
<% end -%>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
commander-5.0.0 lib/commander/help_formatters/terminal/help.erb
commander-4.6.0 lib/commander/help_formatters/terminal/help.erb
commander-4.5.2 lib/commander/help_formatters/terminal/help.erb
commander-4.5.1 lib/commander/help_formatters/terminal/help.erb
commander-4.5.0 lib/commander/help_formatters/terminal/help.erb
commander-4.4.7 lib/commander/help_formatters/terminal/help.erb