Skip to content

Commit

Permalink
fixes lookup command alias
Browse files Browse the repository at this point in the history
  • Loading branch information
subchen committed May 24, 2018
1 parent 234925a commit 42cda4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ func (c *Command) Names() []string {

func lookupCommand(commands []*Command, name string) *Command {
for _, c := range commands {
if c.Name == name {
return c
for _, n := range c.Names() {
if n == name {
return c
}
}
}
return nil
Expand Down

0 comments on commit 42cda4d

Please sign in to comment.