noshortaliases fixed (meaning swapped)
This commit is contained in:
parent
7be062c1db
commit
ec025652c9
|
@ -120,10 +120,13 @@ class DenCli::Sub
|
|||
name = name.to_s unless name.nil?
|
||||
@subs[name] = obj
|
||||
if @noshortaliases
|
||||
DenCli.gen_aliases( name, min) {|a| @aliases[a] ||= obj }
|
||||
else
|
||||
warn "Alias already exists: #{full_cmd.join ' '} #{name}" if @aliases.has_key? name
|
||||
warn "Command/Alias already exists: #{full_cmd.join ' '} #{name}" if @aliases.has_key? name
|
||||
@aliases[name] = obj
|
||||
else
|
||||
DenCli.gen_aliases name, min do |a|
|
||||
warn "Command/Alias already exists: #{full_cmd.join ' '} #{a}" if @aliases.has_key? a
|
||||
@aliases[a] ||= obj
|
||||
end
|
||||
end
|
||||
if aliases
|
||||
[*aliases].each do |a|
|
||||
|
|
Loading…
Reference in a new issue