summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-04-09 20:26:45 +0200
committerLudovic Courtès <ludo@gnu.org>2022-04-19 18:07:49 +0200
commit5e0c3479759047311b6a518fd0bc512b232f201a (patch)
tree0b975ae4eecb5e3603ed7f6d4851beab81bf5b24 /guix/scripts/package.scm
parentd08e4d52a3c9790b8141d10540d4215a1df80375 (diff)
downloadguix-patches-5e0c3479759047311b6a518fd0bc512b232f201a.tar
guix-patches-5e0c3479759047311b6a518fd0bc512b232f201a.tar.gz
ui: Highlight package and service search results.
* guix/ui.scm (package->recutils): Add #:highlighting parameter and use it. (display-search-results): Add #:regexps parameter; call 'colorize-full-matches' and pass #:highlighting. * guix/scripts/package.scm (process-query): Pass #:regexps to 'display-search-results'. * guix/scripts/home.scm (search): Likewise. * guix/scripts/system/search.scm (service-type->recutils): Add #:highlighting parameter and use it.
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 22ee8a2485..d007005607 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -885,7 +885,8 @@ processed, #f otherwise."
(regexps (map (cut make-regexp* <> regexp/icase) patterns))
(matches (find-packages-by-description regexps)))
(leave-on-EPIPE
- (display-search-results matches (current-output-port)))
+ (display-search-results matches (current-output-port)
+ #:regexps regexps))
#t))
(('show _)