Function: projectile--run-term
projectile--run-term is a byte-compiled function defined in
projectile.el.
Signature
(projectile--run-term NEW-PROCESS &optional OTHER-WINDOW)
Documentation
Invoke term in the project's root.
NEW-PROCESS forces creation of a new process instead of reusing an existing buffer.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--run-term (new-process &optional _other-window)
"Invoke `term' in the project's root.
NEW-PROCESS forces creation of a new process instead of reusing an
existing buffer."
(let* ((project (projectile-acquire-root))
(buffer-name (projectile-generate-process-name "term" new-process project))
(default-program (or explicit-shell-file-name
(getenv "ESHELL")
(getenv "SHELL")
"/bin/sh")))
(unless (get-buffer buffer-name)
(require 'term)
(let ((program (read-from-minibuffer "Run program: " default-program)))
(projectile-with-default-dir project
(set-buffer (term-ansi-make-term buffer-name program))
(term-mode)
(term-char-mode))))
(switch-to-buffer buffer-name)))