Sha256: e706f0a4fd6c1f2b905aca2c371b4ec3b3ed15bdc1a6bea4dd3e30182b10b032

Contents?: true

Size: 1021 Bytes

Versions: 2

Compression:

Stored size: 1021 Bytes

Contents

<% if !@syntax -%>
  <%= $terminal.color "NAME", :bold %>:

    <%= @name %>
<% else -%>
  <%= $terminal.color "SYNOPSIS", :bold %>:

    <%= syntax -%>

<% end -%>

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

    <%= Commander::HelpFormatter.indent 4, (@description || @summary || 'No description.') -%>

<% unless @examples.empty? -%>

  <%= $terminal.color "EXAMPLES", :bold %>:
	<% for description, command in @examples -%>

    # <%= description %>
    <%= command %>
	<% end -%>
<% end -%>
<% unless slop.options.empty? -%>

  <%= $terminal.color "OPTIONS", :bold %>:
	<% slop.options.each do |option| -%>

  <% tag = if [Slop::BoolOption, Slop::NullOption].include?(option.class)
             nil
           else
             option.key.upcase
           end
  -%>
  <%= option.flags.join ', ' %> <%= tag %>
        <%= Commander::HelpFormatter.indent 8, option.desc %><% if option.default_value %>
        <%= $terminal.color "Default", :bold %>: <%= option.default_value %><% end %>
  <% end -%>
<% end -%>

Version data entries

2 entries across 2 versions & 1 rubygems

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