Function: project-eshell

project-eshell is an autoloaded, interactive and byte-compiled function defined in project.el.gz.

Signature

(project-eshell)

Documentation

Start Eshell in the current project's root directory.

If a buffer already exists for running Eshell in the project's root, switch to it. Otherwise, create a new Eshell buffer. With C-u (universal-argument) prefix arg, create a new Eshell buffer even if one already exists. With numeric prefix arg, switch to the session with that number, or create it if it doesn't already exist.

View in manual

Probably introduced at or before Emacs version 28.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/project.el.gz
;;;###autoload
(defun project-eshell ()
  "Start Eshell in the current project's root directory.
If a buffer already exists for running Eshell in the project's root,
switch to it.  Otherwise, create a new Eshell buffer.
With \\[universal-argument] prefix arg, create a new Eshell buffer even
if one already exists.
With numeric prefix arg, switch to the session with that number, or
create it if it doesn't already exist."
  (interactive)
  (defvar eshell-buffer-name)
  (let* ((default-directory (project-root (project-current t)))
         (eshell-buffer-name (project-prefixed-buffer-name "eshell")))
    (eshell current-prefix-arg)))