
  <%= program :name %>

  <%= program :description %>

  Commands:
<% for name, command in @commands -%>
<% unless alias? name -%>
    <%= "%-20s %s" % [command.name, command.summary || command.description] %>
<% end -%>
<% end -%>
<% unless @aliases.empty? %>
  Aliases:
<% for alias_name, args in @aliases -%>
    <%= "%-20s %s %s" % [alias_name, command(alias_name).name, args.join(' ')] %>
<% end -%>
<% end %>
<% unless @options.empty? -%>
  Global Options:
<% for option in @options -%>
    <%= "%-20s %s" % [option[:switches].join(', '), option[:description]] -%> 
<% end -%>
<% end -%>
<% if program :help -%>
  <% for title, body in program(:help) %>
  <%= title %>:
    <%= body %>
  <% end %>
<% end -%>


  <%= program :name %>

  <%= program :description %>

  Commands:
<% for name, command in @commands.sort -%>
<% unless alias? name -%>
    <%= "%-20s %s" % [command.name, command.summary || command.description] %>
<% end -%>
<% end -%>
<% unless @aliases.empty? %>
  Aliases:
<% for alias_name, args in @aliases.sort -%>
    <%= "%-20s %s %s" % [alias_name, command(alias_name).name, args.join(' ')] %>
<% end -%>
<% end %>
<% unless @options.empty? -%>
  Global Options:
<% for option in @options -%>
    <%= "%-20s %s" % [option[:switches].join(', '), option[:description]] -%> 
<% end -%>
<% end -%>
<% if program :help -%>
  <% for title, body in program(:help) %>
  <%= title %>:
    <%= body %>
  <% end %>
<% end -%>


Sort commands and aliases alphabetically.
Sort commands and aliases alphabetically.

Signed-off-by: TJ Holowaychuk <546b05909706652891a87f7bfe385ae147f61f91@vision-media.ca>