add action for counsel-find-file

This commit is contained in:
fuxialexander 2018-07-04 23:59:18 +08:00
parent c9ffa063e7
commit a906b82788
2 changed files with 31 additions and 0 deletions

View file

@ -198,6 +198,22 @@ search current file. See `+ivy-task-tags' to customize what this searches for."
(selected-window))))))
;;;###autoload
(defun +ivy/reloading (cmd)
(lambda (x)
(funcall cmd x)
(ivy--reset-state ivy-last)))
;;;###autoload
(defun +ivy/given-file (cmd prompt)
(lambda (source)
(let ((target
(let ((enable-recursive-minibuffers t))
(read-file-name
(format "%s %s to:" prompt source)))))
(funcall cmd source target 1))))
;;
;; File searching
;;