diff --git a/pkg/cmd/search/code/code.go b/pkg/cmd/search/code/code.go index 9d109950d..5aa15825e 100644 --- a/pkg/cmd/search/code/code.go +++ b/pkg/cmd/search/code/code.go @@ -162,7 +162,7 @@ func displayResults(io *iostreams.IOStreams, results search.CodeResult, limit in break } if io.IsStdoutTTY() { - tp.AddField(fmt.Sprintf("%s: %s", cs.YellowBold(strconv.Itoa(row+1)), line)) + tp.AddField(fmt.Sprintf("%s: %s", cs.CyanBold(strconv.Itoa(row+1)), line)) } else { tp.AddField(fmt.Sprintf("%s %s: %s", code.Repo.FullName, code.Path, line)) } @@ -186,7 +186,7 @@ func buildOutput(tm search.TextMatch, cs *iostreams.ColorScheme) (string, map[in var out strings.Builder for i, c := range tm.Fragment { if shouldHighlight[i] { - out.WriteString(cs.Yellow(string(c))) + out.WriteString(cs.CyanBold(string(c))) linesToPrint[line] = true } else { out.WriteRune(c) diff --git a/pkg/iostreams/color.go b/pkg/iostreams/color.go index 12ff49c54..6cb5a607a 100644 --- a/pkg/iostreams/color.go +++ b/pkg/iostreams/color.go @@ -9,17 +9,16 @@ import ( ) var ( - magenta = ansi.ColorFunc("magenta") - cyan = ansi.ColorFunc("cyan") - red = ansi.ColorFunc("red") - yellow = ansi.ColorFunc("yellow") - blue = ansi.ColorFunc("blue") - green = ansi.ColorFunc("green") - gray = ansi.ColorFunc("black+h") - bold = ansi.ColorFunc("default+b") - cyanBold = ansi.ColorFunc("cyan+b") - greenBold = ansi.ColorFunc("green+b") - yellowBold = ansi.ColorFunc("yellow+b") + magenta = ansi.ColorFunc("magenta") + cyan = ansi.ColorFunc("cyan") + red = ansi.ColorFunc("red") + yellow = ansi.ColorFunc("yellow") + blue = ansi.ColorFunc("blue") + green = ansi.ColorFunc("green") + gray = ansi.ColorFunc("black+h") + bold = ansi.ColorFunc("default+b") + cyanBold = ansi.ColorFunc("cyan+b") + greenBold = ansi.ColorFunc("green+b") gray256 = func(t string) string { return fmt.Sprintf("\x1b[%d;5;%dm%s\x1b[m", 38, 242, t) @@ -73,13 +72,6 @@ func (c *ColorScheme) Yellowf(t string, args ...interface{}) string { return c.Yellow(fmt.Sprintf(t, args...)) } -func (c *ColorScheme) YellowBold(t string) string { - if !c.enabled { - return t - } - return yellowBold(t) -} - func (c *ColorScheme) Green(t string) string { if !c.enabled { return t