rename counsel-projectile

New name is counsel-projectile-switch-project
This commit is contained in:
Eric Danan 2016-09-13 22:48:48 +02:00
parent 358eefcafe
commit ba4a2f9619

View file

@ -108,13 +108,13 @@ With a prefix ARG invalidates the cache first."
(switch-to-buffer-other-window x)) (switch-to-buffer-other-window x))
"other window"))) "other window")))
;;; counsel-projectile ;;; counsel-projectile-switch-project
;;;###autoload ;;;###autoload
(defun counsel-projectile (&optional arg) (defun counsel-projectile-switch-project (&optional arg)
"Use projectile with Ivy instead of ido. "Switch to a project we have visited before.
Invokes the command referenced by `projectile-switch-project-action' on switch.
With a prefix ARG invalidates the cache first." With a prefix ARG invokes `projectile-commander' instead of `projectile-switch-project-action.'"
(interactive "P") (interactive "P")
(ivy-read (projectile-prepend-project-name "Switch to project: ") (ivy-read (projectile-prepend-project-name "Switch to project: ")
projectile-known-projects projectile-known-projects
@ -123,10 +123,10 @@ With a prefix ARG invalidates the cache first."
:action (lambda (dir) :action (lambda (dir)
(projectile-switch-project-by-name dir arg)) (projectile-switch-project-by-name dir arg))
:require-match t :require-match t
:caller 'counsel-projectile)) :caller 'counsel-projectile-switch-project))
(ivy-set-actions (ivy-set-actions
'counsel-projectile 'counsel-projectile-switch-project
'(("f" (lambda (dir) '(("f" (lambda (dir)
(let ((projectile-switch-project-action 'counsel-projectile-find-file)) (let ((projectile-switch-project-action 'counsel-projectile-find-file))
(projectile-switch-project-by-name dir arg))) (projectile-switch-project-by-name dir arg)))