completion/ivy: escape regexp for literal ag searches

This commit is contained in:
Henrik Lissner 2017-04-11 09:25:04 -04:00
parent 6c10567e9e
commit f9ddc53bfc

View file

@ -18,7 +18,8 @@ DIR specifies the default-directory from which ag is run."
(if regex-p (rxt-quote-pcre str) str)))) (if regex-p (rxt-quote-pcre str) str))))
+ivy--ag-last-search))) +ivy--ag-last-search)))
(setq +ivy--ag-last-search search) (setq +ivy--ag-last-search search)
(counsel-ag search (or dir (doom-project-root)) (counsel-ag (if regex-p search (rxt-quote-pcre search))
(or dir (doom-project-root))
(concat "--nocolor --nogroup" (if regex-p " -Q"))))) (concat "--nocolor --nogroup" (if regex-p " -Q")))))
;;;###autoload (autoload '+ivy:ag-search-cwd "completion/ivy/autoload/evil" nil t) ;;;###autoload (autoload '+ivy:ag-search-cwd "completion/ivy/autoload/evil" nil t)