branch: externals/consult commit 57dc1adfdc0feafc71c6f418ff7aa1adbe47a5fd Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Adjust consult--grep-match-regexp in order to support -[ABC] grep options (Fix #466) The options -A, -B and -C can be passed to grep and ripgrep to show context around the matching lines. The regexp had to be adjusted since the returned lines have the form "file\0line-content" in contrast to "file\0line\0content" or "file\0line:content". --- consult.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consult.el b/consult.el index a3a8b47..3c94657 100644 --- a/consult.el +++ b/consult.el @@ -218,7 +218,7 @@ See `consult--multi' for a description of the source values." :type 'integer) (defconst consult--grep-match-regexp - "\\`\\(?:\\./\\)?\\([^\n\0]+\\)\0\\([0-9]+\\)[:\0]" + "\\`\\(?:\\./\\)?\\([^\n\0]+\\)\0\\([0-9]+\\)[-:\0]" "Regexp used to match file and line of grep output.") (defcustom consult-grep-args