Skip to content
Snippets Groups Projects
Commit 7da680e1 authored by Liu Miao's avatar Liu Miao
Browse files

add function user/counsel-search-rg

parent b687a313
No related branches found
No related tags found
No related merge requests found
......@@ -19,5 +19,16 @@
(interactive)
(find-file user/userconfig-file))
(defun user/counsel-search-rg (&optional initial-directory)
"Searching with rg in Emacs. If INITIAL-DIRECTORY is non nil
start in that directory."
(interactive)
(require 'counsel)
(let* ((default-directory
(or initial-directory (read-directory-name "Start from directory: ")))
)
(counsel-rg "" default-directory nil "Searching with rg: "))
)
(provide 'functions)
;;; functions.el ends here
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment