Created
March 20, 2025 05:17
-
-
Save andiogenes/246265cc5a1bc469e5021c6130f951aa to your computer and use it in GitHub Desktop.
Open shell in directory corresponding to buffer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun shell-here () | |
"Create new shell rooted at default-directory and open it in | |
new window if there is no other shells associated with | |
default-directory, open existing shell otherwise." | |
(interactive) | |
(let* ((buffer-dir (directory-file-name (expand-file-name default-directory))) | |
(shell-buffer-name (concat "*shell*<" buffer-dir "/>"))) | |
(shell shell-buffer-name))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment