Function: projectile-repeat-last-command
projectile-repeat-last-command is an autoloaded, interactive and
byte-compiled function defined in projectile.el.
Signature
(projectile-repeat-last-command SHOW-PROMPT)
Documentation
Run last projectile external command.
External commands are: projectile-configure-project,
projectile-compile-project, projectile-test-project,
projectile-install-project, projectile-package-project,
and projectile-run-project.
If the prefix argument SHOW-PROMPT is non nil, the command can be edited.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
;;;###autoload
(defun projectile-repeat-last-command (show-prompt)
"Run last projectile external command.
External commands are: `projectile-configure-project',
`projectile-compile-project', `projectile-test-project',
`projectile-install-project', `projectile-package-project',
and `projectile-run-project'.
If the prefix argument SHOW-PROMPT is non nil, the command can be edited."
(interactive "P")
(let* ((project-root (projectile-acquire-root))
(command-history (projectile--get-command-history project-root))
(command (car-safe (ring-elements command-history)))
(compilation-read-command show-prompt)
executed-command)
(unless command
(user-error "No command has been run yet for this project"))
(setq executed-command
(projectile--run-project-cmd command
nil
:save-buffers t
:prompt-prefix "Execute command: "))
(unless (string= command executed-command)
(ring-insert command-history executed-command))))