<% if @command.syntax.is_a?(Array) -%>
Usage
<%= table(
    @command.syntax.map do |s|
      s ? [Array(program :name).first, @command.name, s] : [' ']
    end, 
    table_args('  ')
  ).join("\n") %>

<% else -%>
Usage: <%= Array(program :name).first %> <%= @command.name %><%= " #{@command.syntax}" if @command.syntax %>
<% end -%>
<% unless @command.options.blank? or @command.options.all?{ |o| o[:hide] } -%>
Pass '--help' to see the full list of options
<% end -%>
<% unless @actions.nil? or @actions.empty? -%>

<%= @command.description || @command.summary %>

List of Actions
<%= table(@actions.map{ |a| [a[:name], a[:summary]] }, table_args('  ', 18)).join("\n") %>
<% end -%>
