I have been doing further tests and I think that the actual definition
should read as follows
(defun project-shell-fix ()
"Fixed version for project-shell"
(interactive)
(require 'comint)
(let* ((default-directory (expand-file-name (project-root (project-current
t))))
(default-project-shell-name (project-prefixed-buffer-name "shell"))
(shell-buffer (get-buffer default-project-shell-name)))
(if (comint-check-proc shell-buffer)
(pop-to-buffer shell-buffer (bound-and-true-p
display-comint-buffer-action))
(shell (or shell-buffer default-project-shell-name)))))
The change in the last line is needed, because otherwise the shell is
created with the wrong name.