branch: master
commit 1efb0d6b1d7a7a2df11009c8d10d66c8dcefb0c3
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    counsel.el (counsel-find-file-occur): Add
---
 counsel.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/counsel.el b/counsel.el
index 608f6e3..7f4e29e 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1713,6 +1713,14 @@ When INITIAL-INPUT is non-nil, use it in the minibuffer 
during completion."
             :keymap counsel-find-file-map
             :caller 'counsel-find-file))
 
+(ivy-set-occur 'counsel-find-file 'counsel-find-file-occur)
+
+(defun counsel-find-file-occur ()
+  (cd ivy--directory)
+  (counsel-cmd-to-dired
+   (format
+    "ls | grep -i -E '%s' | xargs ls" ivy--old-re)))
+
 (defun counsel-up-directory ()
   "Go to the parent directory preselecting the current one.
 

Reply via email to