Function: projectile--dispatch-define
projectile--dispatch-define is a byte-compiled function defined in
projectile.el.
Signature
(projectile--dispatch-define)
Documentation
Define the projectile-dispatch transient prefix, replacing the stub.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
;; `projectile-dispatch' is a transient menu mirroring `projectile-command-map'.
;; The menu keys deliberately match the `projectile-command-map' bindings.
;; The transient prefix is defined lazily: loading `transient' costs a few
;; milliseconds and some memory for every session, while the menu is only
;; needed once invoked. `projectile-dispatch' below is a stub that loads
;; `transient', evaluates the real definition (replacing itself), and
;; re-invokes it; `transient' is required at compile time (see the top of
;; the file) so the macro still expands during byte-compilation.
(defun projectile--dispatch-define ()
"Define the `projectile-dispatch' transient prefix, replacing the stub."
(transient-define-prefix projectile-dispatch ()
"Dispatch menu for Projectile commands.
The switches in the Modifiers group tweak how the commands below run:
`--invalidate-cache' rebuilds the file cache first (file/dir commands),
`--regexp' searches for a regexp (the ag/ripgrep search and the
reviewable search/replace), `--case-sensitive' seeds the reviewable
search/replace case-sensitive, `--word' makes it match whole words,
`--new-process' starts a fresh process
(shells), and `--display' opens the result in another window or frame
(file/buffer/project commands)."
["Modifiers"
("-i" "invalidate cache" "--invalidate-cache")
("-r" "regexp search" "--regexp")
("-c" "case-sensitive search" "--case-sensitive")
("-w" "whole-word search" "--word")
("-n" "new process" "--new-process")
("-d" "display in" "--display="
:class transient-switches
:argument-format "--display=%s"
:argument-regexp "\\(--display=\\(window\\|frame\\)\\)"
:choices ("window" "frame"))]
[["Find"
("f" "file" projectile-dispatch-find-file)
("g" "file dwim" projectile-dispatch-find-file-dwim)
("a" "other file" projectile-dispatch-find-other-file)
("l" "file in dir" projectile-find-file-in-directory)
("C" "changed file" projectile-find-changed-file)
("F" "file in known projects" projectile-find-file-in-known-projects)
("nf" "file in sibling projects" projectile-find-file-in-sibling-projects)
("d" "dir" projectile-dispatch-find-dir)
("D" "dired" projectile-dispatch-dired)
("e" "recentf" projectile-recentf)
("E" "edit .dir-locals" projectile-edit-dir-locals)
("T" "test file" projectile-dispatch-find-test-file)
("t" "toggle impl/test" projectile-dispatch-impl-or-test)
("j" "file of kind" projectile-dispatch-find-file-of-kind)
("J" "toggle related" projectile-toggle-related-file)]
["Buffers"
("b" "switch buffer" projectile-dispatch-switch-to-buffer)
("nb" "buffer in siblings" projectile-switch-to-buffer-in-sibling-projects)
("C-o" "display buffer" projectile-display-buffer)
("I" "ibuffer" projectile-ibuffer)
("k" "kill buffers" projectile-kill-buffers)
("S" "save buffers" projectile-save-project-buffers)]
["Bookmarks"
("Bs" "set bookmark" projectile-bookmark-set)
("Bj" "jump to bookmark" projectile-bookmark-jump)
("Bd" "delete bookmark" projectile-bookmark-delete)]
["Search / Replace"
("ss" "search" projectile-dispatch-search)
("sg" "grep" projectile-grep)
("sr" "ripgrep" projectile-dispatch-ripgrep)
("sa" "ag" projectile-dispatch-ag)
("sx" "references" projectile-find-references)
("sR" "search (review)" projectile-dispatch-search-review)
("ns" "search siblings" projectile-dispatch-search-siblings)
("no" "multi-occur siblings" projectile-multi-occur-in-sibling-projects)
("nt" "todos in siblings" projectile-todos-in-sibling-projects)
("st" "todos" projectile-todos)
("o" "multi-occur" projectile-multi-occur)
("r" "replace" projectile-replace)
("R" "replace (review)" projectile-dispatch-replace-review)
("u" "undo last replace" projectile-replace-undo)]]
[["Project"
("p" "switch project" projectile-dispatch-switch-project)
("q" "switch open project" projectile-switch-open-project)
("W" "switch worktree" projectile-switch-worktree)
("np" "switch sibling project" projectile-switch-sibling-project)
("A" "add known project" projectile-add-known-project)
("v" "vc" projectile-vc)
("P" "dashboard" projectile-dashboard)
("H" "doctor" projectile-doctor)]
["Lifecycle"
("cc" "compile" projectile-compile-project)
("ct" "test" projectile-test-project)
("c." "test at point" projectile-run-test-at-point)
("cr" "run" projectile-run-project)
("co" "configure" projectile-configure-project)
("ci" "install" projectile-install-project)
("cp" "package" projectile-package-project)
("cx" "run task" projectile-run-task)
("cX" "repeat last task" projectile-repeat-last-task)]
["Subproject"
("cmf" "find file" projectile-find-file-in-subproject)
("cmc" "compile" projectile-compile-subproject)
("cmt" "test" projectile-test-subproject)
("cmr" "run" projectile-run-subproject)
("cmo" "configure" projectile-configure-subproject)
("cmi" "install" projectile-install-subproject)
("cmp" "package" projectile-package-subproject)]
["Shells / Run"
("xr" "run" projectile-dispatch-run)
("xe" "eshell" projectile-dispatch-run-eshell)
("xs" "shell" projectile-dispatch-run-shell)
("xt" "term" projectile-dispatch-run-term)
("xi" "ielm" projectile-dispatch-run-ielm)
("xg" "gdb" projectile-run-gdb)
("xv" "vterm" projectile-dispatch-run-vterm)
("xx" "eat" projectile-dispatch-run-eat)
("xG" "ghostel" projectile-dispatch-run-ghostel)
("!" "shell command" projectile-run-shell-command-in-root)
("&" "async shell command" projectile-run-async-shell-command-in-root)]
["Session"
("ws" "save session" projectile-session-save)
("wS" "save all sessions" projectile-session-save-all)
("wr" "restore session" projectile-session-restore)
("wR" "restore all sessions" projectile-session-restore-all)
("wf" "forget session" projectile-session-forget)
("wb" "switch project buffer" projectile-session-switch-to-buffer)]
["Cache"
("i" "invalidate cache" projectile-invalidate-cache)
("z" "cache current file" projectile-cache-current-file)]]))