feat(emacs): Eshell stuff
- 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
This commit is contained in:
@@ -135,4 +135,15 @@ If FORCE-P, delete without confirmation."
|
||||
base-file
|
||||
conflict-file)))
|
||||
|
||||
(defun syd-split-tramp-file-name (file-name)
|
||||
"Split FILE-NAME into (TRAMP-PREFIX . LOCAL-NAME). Returns (nil . FILE-NAME)
|
||||
if FILE-NAME has no TRAMP prefix."
|
||||
(if (tramp-tramp-file-p file-name)
|
||||
(let* ((dissected (tramp-dissect-file-name file-name t))
|
||||
(localname (tramp-file-name-localname dissected)))
|
||||
(setf (tramp-file-name-localname dissected) nil)
|
||||
(cons (tramp-make-tramp-file-name dissected)
|
||||
localname))
|
||||
(cons nil file-name)))
|
||||
|
||||
(provide 'syd-file)
|
||||
|
||||
@@ -8,5 +8,9 @@
|
||||
(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
|
||||
|
||||
Reference in New Issue
Block a user