docs(vertico): suppress grep warnings if ripgrep is available

Fix: #8231
This commit is contained in:
Henrik Lissner
2025-01-10 11:14:03 -05:00
parent 8951de19d8
commit a55e4a5aac

View File

@ -7,12 +7,14 @@
module))) module)))
(when (require 'consult nil t) (when (require 'consult nil t)
;; FIXME: This throws an error if grep is missing. (if (executable-find "rg")
(unless (consult--grep-lookahead-p "grep" "-P") ;; TODO: Move this to core in v3.0
(warn! "The installed grep binary was not built with support for PCRE lookaheads") (unless (consult--grep-lookahead-p "rg" "-P")
(explain! "Some advanced consult filtering features will not work as a result, see the module readme.")) (warn! "The installed ripgrep binary was not built with support for PCRE lookaheads.")
(explain! "Some advanced consult filtering features will not work as a result, see the module readme."))
;; TODO: Move this to core in v3.0 (if (executable-find "grep")
(unless (consult--grep-lookahead-p "rg" "-P") (unless (consult--grep-lookahead-p "grep" "-P")
(warn! "The installed ripgrep binary was not built with support for PCRE lookaheads.") (warn! "The installed grep binary was not built with support for PCRE lookaheads")
(explain! "Some advanced consult filtering features will not work as a result, see the module readme."))) (explain! "Some advanced consult filtering features will not work as a result, see the module readme."))
(error! "Neither grep nor ripgrep are available on this system")
(explain! "Various file and project search features won't be available"))))