1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

feature #754: Options can be defined without short value

This commit is contained in:
Daniel Molina 2011-08-23 16:25:11 +02:00
parent f0e959c77e
commit 4ae6c2d8f0

View File

@ -166,6 +166,7 @@ EOT
extra_options = comm[:options] if comm
parse(extra_options)
if comm
check_args!(comm_name, comm[:arity], comm[:args_format])
@ -209,15 +210,23 @@ EOT
next
else
shown_opts << o[:name]
short = o[:short].split(' ').first
printf opt_format, "#{short}, #{o[:large]}", o[:description]
str = ""
str << o[:short].split(' ').first << ', ' if o[:short]
str << o[:large]
printf opt_format, str, o[:description]
puts
end
}
}
@opts.each{ |o|
printf opt_format, "#{o[:short]}, #{o[:large]}", o[:description]
str = ""
str << o[:short] if o[:short]
str << o[:large]
printf opt_format, str, o[:description]
puts
}
end