cache command name (#390)

This commit is contained in:
Di Xu 2017-02-10 00:54:17 +08:00 committed by Eric Paris
parent 99600f6874
commit b5d8e8f46a

View file

@ -972,7 +972,8 @@ func (c *Command) Name() string {
if i >= 0 {
name = name[:i]
}
return name
c.name = name
return c.name
}
// HasAlias determines if a given string is an alias of the command.