(Emacs/app)~changed project-root function and added aliases

project-root now uses project.el.  aliases for goto and project-root.
This commit is contained in:
2024-05-11 13:04:45 +05:30
parent 88ae6fc2e8
commit 40240bbfd7
2 changed files with 10 additions and 8 deletions

View File

@@ -1,3 +1,5 @@
alias ff find-file-other-window $1
alias p~ project-root
alias gt goto
alias clear clear-scrollback
alias d dired $1
alias clear clear-scrollback
alias ff find-file-other-window $1

View File

@@ -547,12 +547,12 @@ directory.
"Use `read-directory-name' to change directories."
(eshell/cd (list (read-directory-name "Directory?: "))))
(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..."))))
(defun eshell/project-root (&rest args)
"Change to directory `project-root'"
(if (project-current)
(eshell/cd (list (project-root (project-current))))
(eshell/echo (format "[%s]: No project in current directory"
(propertize "Error" 'font-lock-face '(:foreground "red"))))))
(defun +eshell/current-buffer ()
(interactive)