Sha256: a7b38ab4df7306b1865914032174f2ed868c1c69c092ac78a3e29f9990b5bc8d

Contents?: true

Size: 1.38 KB

Versions: 2

Compression:

Stored size: 1.38 KB

Contents

<%=
  if !program(:nobanner)
    begin
      require 'openflight/banner'
      OpenFlight::Banner.render(title: program(:application), version: program(:version))
    rescue LoadError
      nil
    end
  end
-%>
  <%= $terminal.color "NAME", :bold %>:

    <%= program :name %>

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

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

  <%= $terminal.color "COMMANDS", :bold %>:
<% for name, command in @help_commands.sort -%>
	<% unless alias? name %>
    <%= "%-#{max_command_length}s %s" % [command.name, command.summary || command.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 global_slop.options.empty? -%>
  <%= $terminal.color "GLOBAL OPTIONS", :bold %>:
	<% global_slop.options.each do |global| -%>

    <% tag = if [Slop::BoolOption, Slop::NullOption]
               nil
             else
               option.key.upcase
             end
    -%>
    <%= global.flags.join ', ' %> <%= tag %>
        <%= global.desc %>
	<% end -%>
<% end -%>
<% if program :help -%>
  <% for title, body in program(:help) %>
  <%= $terminal.color title.to_s.upcase, :bold %>:

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
commander-openflighthpc-2.1.1 lib/commander/help_formatters/terminal/help.erb
commander-openflighthpc-2.1.0 lib/commander/help_formatters/terminal/help.erb