| Path: | lib/commander/help_formatters/terminal/help.erb |
| Last Update: | Wed Feb 09 10:39:40 +0000 2011 |
<%= $terminal.color "NAME", :bold %>:
<%= program :name %>
<%= $terminal.color "DESCRIPTION", :bold %>:
<%= program :description %>
<%= $terminal.color "COMMANDS", :bold %>:
<% for name, command in @commands.sort -%>
<% unless alias? name %>
<%= "%-20s %s" % [command.name, command.summary || command.description] -%>
<% end -%>
<% end %> <% unless @aliases.empty? %>
<%= $terminal.color "ALIASES", :bold %>:
<% for alias_name, args in @aliases.sort %>
<%= "%-20s %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 -%>