Skip to content

Commit

Permalink
Use same colors in the output as the rg
Browse files Browse the repository at this point in the history
  • Loading branch information
BostX committed Oct 25, 2023
1 parent f102233 commit 6042789
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ directory to search in."
(ptrn (car patterns)))
(display-fn txt)
(if colorize-matches?
(with-colors 'red (lambda () (color-display ptrn)))
;; b-red means 'bold and red'
(with-colors 'b-red (lambda () (color-display ptrn)))
(display ptrn))
(colorize colorize-matches? display-fn
(cdr matches) (cdr patterns)))]))
Expand All @@ -155,7 +156,7 @@ directory to search in."
(relevant-file-strings-joined
(string-join relevant-file-strings "\n")))
(if colorize-matches?
(with-colors 'white
(with-colors 'magenta
(lambda ()
(color-displayln first-file-string)))
(displayln first-file-string))
Expand Down

0 comments on commit 6042789

Please sign in to comment.