SPC f d -> +default/dired
+default/dired will prompt you for a directory to open dired in. If passed the universal argument, it will prompt you for a known project instead.
This commit is contained in:
parent
ccfaf3f464
commit
87199113bd
2 changed files with 11 additions and 1 deletions
|
@ -57,3 +57,13 @@ If prefix ARG is non-nil, prompt for the search path."
|
|||
(if projectile-project-search-path
|
||||
(mapc #'projectile-discover-projects-in-directory projectile-project-search-path)
|
||||
(user-error "`projectile-project-search-path' is empty; don't know where to search"))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +default/dired (arg)
|
||||
"Open a directory in dired.
|
||||
If prefix ARG is non-nil, prompt for a known project to open in dired."
|
||||
(interactive "P")
|
||||
(dired
|
||||
(if arg
|
||||
(completing-read "Open dired in project: " projectile-known-projects)
|
||||
(dired-read-dir-and-switches ""))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue