Sha256: 3f6833170695b8daf22e6c4593301f4dd60f93460c9108add8b6c22cbd4488a1

Contents?: true

Size: 1.06 KB

Versions: 5

Compression:

Stored size: 1.06 KB

Contents

  <%= $terminal.color "NAME", :bold %>:

    <%= program :name %>

  <%= $terminal.color "DESCRIPTION", :bold %>:

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

  <%= $terminal.color "COMMANDS", :bold %>:
<% for name, command in @commands.sort -%>
	<% unless alias? name %>
    <%= "%-#{max_command_length}s %s" % [command.name, command.instance_variable_get(:@summary) || command.instance_variable_get(:@description)] -%>
	<% end -%>
<% end %>
<% unless @aliases.empty? %>
  <%= $terminal.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? -%>
  <%= $terminal.color "GLOBAL OPTIONS", :bold %>:
	<% for option in @options -%>

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
simple_commander-0.6.1 lib/simple_commander/help_formatters/terminal/help.erb
simple_commander-0.6.0 lib/simple_commander/help_formatters/terminal/help.erb
simple_commander-0.5.1 lib/simple_commander/help_formatters/terminal/help.erb
simple_commander-0.5.0 lib/simple_commander/help_formatters/terminal/help.erb
simple_commander-0.4.0 lib/simple_commander/help_formatters/terminal/help.erb