CommandPath returns the full path to this command.
()
| 1463 | |
| 1464 | // CommandPath returns the full path to this command. |
| 1465 | func (c *Command) CommandPath() string { |
| 1466 | if c.HasParent() { |
| 1467 | return c.Parent().CommandPath() + " " + c.Name() |
| 1468 | } |
| 1469 | return c.DisplayName() |
| 1470 | } |
| 1471 | |
| 1472 | // DisplayName returns the name to display in help text. Returns command Name() |
| 1473 | // If CommandDisplayNameAnnoation is not set |