- Fancify prompt - Shows success of last command. - TRAMP prefix is made distinct. - CWD is abbreviated. - cd to project root (`cdp`). - Imitate using `C-d` / send-EOF to exit. - Opening popup shell puts user in insert state. - Fixes TRAMP customisation. Nicely done! }:3
17 lines
492 B
EmacsLisp
17 lines
492 B
EmacsLisp
;;; syd-project.el -*- lexical-binding: t; -*-
|
|
|
|
(eval-when-compile (require 'cl-lib))
|
|
(require 'project)
|
|
|
|
(cl-defun syd-project-root (&key (dir default-directory))
|
|
"Return the project root of DIR, or nil if DIR belongs to no project."
|
|
(when-let* ((project (project-current nil dir)))
|
|
(project-root project)))
|
|
|
|
(defun syd-cd-project ()
|
|
"Change the working directory to the root of the current project."
|
|
(cd (syd-project-root)))
|
|
|
|
(provide 'syd-project)
|
|
;;; syd-project.el ends here
|