package completion

import (
	

	
	
)

func ( *Engine) ( Values) {
	 := ""

	// First add the command/flag usage string if any,
	// and only if we don't have completions.
	if len(.values) == 0 || .config.GetBool("usage-hint-always") {
		if .Usage != "" {
			 += color.Dim + .Usage + color.Reset + term.NewlineReturn
		}
	}

	// Add application-specific messages.
	// There is full support for color in them, but in case those messages
	// don't include any, we tame the color a little bit first, like hints.
	 := strings.Join(.Messages.Get(), term.NewlineReturn)
	 = strings.TrimSuffix(, term.NewlineReturn)

	if  != "" {
		 =  + color.Dim + 
	}

	// If we don't have any completions, and no messages, let's say it.
	if .Matches() == 0 &&  == color.Dim+term.NewlineReturn && !.auto {
		 = .hintNoMatches()
	}

	 = strings.TrimSuffix(, term.NewlineReturn)
	if  == "" {
		return
	}

	// Add the hint to the shell.
	.hint.Set( + color.Reset)
}

func ( *Engine) () string {
	 := color.Dim + "no matching"

	var  []string

	for ,  := range .groups {
		if .tag == "" {
			continue
		}

		 = append(, .tag)
	}

	if len() > 0 {
		 := strings.Join(, ", ")
		 += "'" +  + "'"
	}

	return  + " completions"
}