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

Allow large options in the CLI without defining the short version

This commit is contained in:
Daniel Molina 2011-08-26 12:17:26 +02:00
parent 3409f9d6b4
commit bbe32d8375

View File

@ -301,7 +301,13 @@ EOT
merge = @opts
merge = @opts + extra_options if extra_options
merge.flatten.each do |e|
opts.on(e[:short],e[:large], e[:format],e[:description]) do |o|
args = []
args << e[:short] if e[:short]
args << e[:large]
args << e[:format]
args << e[:description]
opts.on(*args) do |o|
if e[:proc]
e[:proc].call(o, @options)
elsif e[:name]=="help"