Name returns the command's short name: the last word in the usage line before a flag or argument.
()
| 86 | |
| 87 | // Name returns the command's short name: the last word in the usage line before a flag or argument. |
| 88 | func (c *Command) Name() string { |
| 89 | name := c.LongName() |
| 90 | if i := strings.LastIndex(name, " "); i >= 0 { |
| 91 | name = name[i+1:] |
| 92 | } |
| 93 | return name |
| 94 | } |
| 95 | |
| 96 | // Usage print base usage help info. |
| 97 | func (c *Command) Usage() { |