def help
text = ''
text << usage + "\n"
unless aliases.empty?
text << "\n"
text << "aliases: #{aliases.join(' ')}\n"
end
text << "\n"
text << short_desc + "\n"
text << "\n"
text << long_desc.wrap_and_indent(78, 4) + "\n"
all_option_definitions = base.global_option_definitions + option_definitions
unless all_option_definitions.empty?
text << "\n"
text << "options:\n"
text << "\n"
all_option_definitions.sort { |x,y| x[:long] <=> y[:long] }.each do |opt_def|
text << sprintf(" -%1s --%-10s %s\n", opt_def[:short], opt_def[:long], opt_def[:desc])
end
end
text
end