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?
|
name = name.to_s unless name.nil?
|
||||||
@subs[name] = obj
|
@subs[name] = obj
|
||||||
if @noshortaliases
|
if @noshortaliases
|
||||||
DenCli.gen_aliases( name, min) {|a| @aliases[a] ||= obj }
|
warn "Command/Alias already exists: #{full_cmd.join ' '} #{name}" if @aliases.has_key? name
|
||||||
else
|
|
||||||
warn "Alias already exists: #{full_cmd.join ' '} #{name}" if @aliases.has_key? name
|
|
||||||
@aliases[name] = obj
|
@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
|
end
|
||||||
if aliases
|
if aliases
|
||||||
[*aliases].each do |a|
|
[*aliases].each do |a|
|
||||||
|
|
Loading…
Reference in a new issue