From a41f02e6e76681ae12b7dc5308dc0dd57155ecf0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 10 Dec 2017 14:54:28 -0500 Subject: [PATCH] completion/ivy: turn off my "very magic" regex mod This makes regex consistent between evil-search, ivy, ripgrep and ag. --- modules/completion/ivy/autoload/ivy.el | 3 +-- modules/completion/ivy/config.el | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index d14a8faaa..8a008348d 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -144,8 +144,7 @@ counsel-rg)." (let ((default-directory counsel--git-dir) (regex (counsel-unquote-regex-parens (setq ivy--old-re - (ivy--regex - (counsel-unquote-regex-parens string)))))) ;; #2 + (ivy--regex string))))) (let* ((args-end (string-match " -- " extra-ag-args)) (file (if args-end (substring-no-properties extra-ag-args (+ args-end 3)) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 0f5a725a7..6f35efcfd 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -82,10 +82,8 @@ immediately runs it on the current candidate (ending the ivy session)." '(("O" +ivy-git-grep-other-window-action "open in other window")))) ;; 1. Remove character limit from `counsel-ag-function' - ;; 2. Disable ivy's over-zealous parentheses quoting behavior (if i want - ;; literal parentheses, I'll escape them myself). - ;; 3. This may need to be updated frequently, to meet changes upstream - ;; 4. counsel-ag, counsel-rg and counsel-pt all use this function + ;; 2. This may need to be updated frequently, to meet changes upstream + ;; 3. counsel-ag, counsel-rg and counsel-pt all use this function (advice-add #'counsel-ag-function :override #'+ivy*counsel-ag-function))