def parameters_section
arguments = main.parameters.select{|p| p.type == :argument}
keywords = main.parameters.select{|p| p.type == :keyword}
options = main.parameters.select{|p| p.type == :option}
environment = main.parameters.select{|p| p.type == :environment}
help, nothelp = options.partition{|p| p.name == 'help'}
options = nothelp + help
parameters = arguments + keywords + options + environment
s =
parameters.map do |p|
ps = ''
ps << Util.columnize("#{ p.synopsis }", :indent => 2, :width => 78)
if p.description?
ps << "\n"
ps << Util.columnize("#{ p.description }", :indent => 6, :width => 78)
end
unless(p.examples.nil? or p.examples.empty?)
p.examples.each do |example|
ps << "\n"
ps << Util.columnize("#{ example }", :indent => 8, :width => 78)
end
end
ps
end.join("\n")
end