CMD-options: OptionParser#on support "--abc STR". implemented for CMD#opt, too.
This commit is contained in:
parent
ba922fe52c
commit
8fe78bb406
|
@ -169,11 +169,11 @@ class DenCli::CMD
|
|||
case opt
|
||||
when /\A(--\[no-\][^= ]+)\z/
|
||||
@long, @val = $1, nil
|
||||
when /\A(--[^=]+)=(.+)\z/
|
||||
when /\A(--[^= ]+)[= ](.+)\z/
|
||||
@long, @val = $1, $2 || @val
|
||||
when /\A(--[^= ]+)\z/
|
||||
@long, @val = $1, nil
|
||||
when /\A(-[^=-])=?(.+)\z/
|
||||
when /\A(-[^= -])[= ]?(.+)\z/
|
||||
@short, @val = $1, $2 || @val
|
||||
when /\A(-[^= -])\z/
|
||||
@short, @val = $1, nil
|
||||
|
|
Loading…
Reference in a new issue