lib/ctioga2/commands/doc/help.rb in ctioga2-0.4 vs lib/ctioga2/commands/doc/help.rb in ctioga2-0.5
- old
+ new
@@ -16,11 +16,11 @@
require 'ctioga2/commands/parsers/command-line'
require 'ctioga2/commands/doc/wordwrap'
module CTioga2
- Version::register_svn_info('$Revision: 132 $', '$Date: 2010-01-14 23:18:19 +0100 (Thu, 14 Jan 2010) $')
+ Version::register_svn_info('$Revision: 409 $', '$Date: 2013-08-22 21:23:51 +0200 (Thu, 22 Aug 2013) $')
module Commands
module Documentation
@@ -152,10 +152,10 @@
str += desc_lines.join("\n#{total_leading_spaces}")
if cmd.has_options?
op_start = ' options: '
options = cmd.optional_arguments.
- keys.sort.map { |x| "/#{x}"}.join(' ')
+ keys.sort.map { |x| "/#{cmd.normalize_option_name(x)}"}.join(' ')
opts_lines = WordWrapper.wrap(options, size - op_start.size)
str += "\n#{total_leading_spaces}#{style(op_start,'switch')}" +
style(opts_lines.join("\n#{total_leading_spaces}#{' ' * op_start.size}"), 'options')
end
return str