From 0c9909c2307e266987574f28a7b2da4986a96bfa Mon Sep 17 00:00:00 2001 From: UmairShahzad <18100099@lums.edu.pk> Date: Thu, 27 Feb 2020 01:44:35 +0500 Subject: [PATCH] pluralize match if total == 1 --- command/common.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/command/common.go b/command/common.go index a0cb37822..299ed030d 100644 --- a/command/common.go +++ b/command/common.go @@ -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" }