// Display returns the command as a human readable string.
Display returns the command as a human readable string.
// Display returns the command as a human readable string .
func (c Command) Display(data TemplateData) (string, error) {
	str := []string{}
	if c.DisplayName != "" {
		str = append(str, chalk.Cyan.Color(c.DisplayName))
	}
	args, err := c.Args(data, TemplateOptions{})
	if err != nil {
		return "", err
	}
	command := append([]string{c.Name()}, args...)
	str = append(str, chalk.Green.Color(strings.Join(command, " ")))
	return strings.Join(str, ": "), nil
}
func ( c Command ) Display ( data TemplateData ) ( string , error ) { str := [ ] string { } if c . DisplayName != " " { str = append ( str , chalk . Cyan . Color ( c . DisplayName ) ) } args , err := c . Args ( data , TemplateOptions { } ) if err != nil { return " " , err } command := append ( [ ] string { c . Name ( ) } , args ... ) str = append ( str , chalk . Green . Color ( strings . Join ( command , " " ) ) ) return strings . Join ( str , " " ) , nil }
Display returns the command as a human readable string.
Display returns the command as a human readable string .