pluralize match if total == 1
This commit is contained in:
parent
3c687ed111
commit
0c9909c230
1 changed files with 5 additions and 1 deletions
|
|
@ -32,7 +32,11 @@ func getTitle(cmd *cobra.Command, cmdType string, matchCount int, totalMatchCoun
|
|||
|
||||
title = "\nShowing %d of %s in %s"
|
||||
if (!limitSet && userSetFlagCounter > 0) || (userSetFlagCounter > 1) {
|
||||
title += " that match your search\n\n"
|
||||
matchStr := "match"
|
||||
if totalMatchCount == 1 {
|
||||
matchStr = "matches"
|
||||
}
|
||||
title += fmt.Sprintf(" that %s your search\n\n", matchStr)
|
||||
} else {
|
||||
title += "\n\n"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue