(Emacs/app)+eshell command that goes to projectile-project-root if it exists
This commit is contained in:
@@ -520,7 +520,14 @@ much faster than ~cd ..; ls -l~).
|
|||||||
|
|
||||||
(defun eshell/goto (&rest args)
|
(defun eshell/goto (&rest args)
|
||||||
"Use `read-directory-name' to change directories."
|
"Use `read-directory-name' to change directories."
|
||||||
(eshell/cd (list (read-directory-name "Enter directory to go to:")))))
|
(eshell/cd (list (read-directory-name "Enter directory to go to:"))))
|
||||||
|
|
||||||
|
(with-eval-after-load "projectile"
|
||||||
|
(defun eshell/goto-project-root (&rest args)
|
||||||
|
"Change to directory `projectile-project-root'"
|
||||||
|
(if (projectile-project-root)
|
||||||
|
(eshell/cd (list (projectile-project-root)))
|
||||||
|
(eshell/echo "Projectile not active here...")))))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Eshell change directory quickly
|
** Eshell change directory quickly
|
||||||
~eshell/goto~ is a better ~cd~ for eshell. However it is really just
|
~eshell/goto~ is a better ~cd~ for eshell. However it is really just
|
||||||
|
|||||||
Reference in New Issue
Block a user