diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-04-16 21:58:44 +0630 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-04-16 21:59:29 +0630 |
commit | 55862a521696b9e36b43d719587a9f266b21749b (patch) | |
tree | da34d9e0587f638e714bc7e1fc5266505c328f1f /Emacs/.config/emacs/app.org | |
parent | e07c2c145722c3fd29d2eec6e5c665b1f3ac8acd (diff) | |
download | dotfiles-55862a521696b9e36b43d719587a9f266b21749b.tar.gz dotfiles-55862a521696b9e36b43d719587a9f266b21749b.tar.bz2 dotfiles-55862a521696b9e36b43d719587a9f266b21749b.zip |
(Emacs/app)+eshell command that goes to `projectile-project-root` if it exists
Diffstat (limited to 'Emacs/.config/emacs/app.org')
-rw-r--r-- | Emacs/.config/emacs/app.org | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index ce47e23..8fcecbb 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -520,7 +520,14 @@ much faster than ~cd ..; ls -l~). (defun eshell/goto (&rest args) "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 ** Eshell change directory quickly ~eshell/goto~ is a better ~cd~ for eshell. However it is really just |