Function: projectile--posix-shell
projectile--posix-shell is a byte-compiled function defined in
projectile.el.
Signature
(projectile--posix-shell)
Documentation
Return the POSIX shell the asynchronous indexer should run under, or nil.
The async runner wraps the command in POSIX-sh syntax (the { ...; }
2>file grouping in projectile-files-via-ext-command-async), so it needs
a POSIX shell rather than the user's interactive shell-file-name, which
may be csh/tcsh/fish (see #2042). On Unix that is always /bin/sh. On
Windows there is no guaranteed one, so we look for sh on the executable
search path (e.g. the sh.exe shipped with Git for Windows or MSYS) and
return nil when none is found - the caller then falls back to the
synchronous runner, which drives cmd.exe without any POSIX syntax
(see #2116).
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--posix-shell ()
"Return the POSIX shell the asynchronous indexer should run under, or nil.
The async runner wraps the command in POSIX-sh syntax (the `{ ...; }
2>file' grouping in `projectile-files-via-ext-command-async'), so it needs
a POSIX shell rather than the user's interactive `shell-file-name', which
may be csh/tcsh/fish (see #2042). On Unix that is always `/bin/sh'. On
Windows there is no guaranteed one, so we look for `sh' on the executable
search path (e.g. the `sh.exe' shipped with Git for Windows or MSYS) and
return nil when none is found - the caller then falls back to the
synchronous runner, which drives cmd.exe without any POSIX syntax
\(see #2116)."
(if (memq system-type '(windows-nt ms-dos))
(executable-find "sh")
"/bin/sh"))