Skip to content

Commit 560776f

Browse files
Add ghostel-project function
1 parent 168a5ad commit 560776f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

ghostel.el

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,6 +1974,16 @@ wheel events reach ghostel's own scroll commands."
19741974
(ghostel--start-process))
19751975
(switch-to-buffer buffer)))
19761976

1977+
;;;###autoload
1978+
(defun ghostel-project ()
1979+
"Create a new Ghostel terminal in the current project's root.
1980+
The buffer name is prefixed with the project name."
1981+
(interactive)
1982+
(let ((default-directory (project-root (project-current t)))
1983+
(ghostel-buffer-name (project-prefixed-buffer-name
1984+
(string-replace "*" "" ghostel-buffer-name))))
1985+
(ghostel)))
1986+
19771987
(defun ghostel-other ()
19781988
"Switch to the next ghostel terminal buffer, or create one."
19791989
(interactive)

0 commit comments

Comments
 (0)