Function: ghostel--resolve-shell-spec
ghostel--resolve-shell-spec is a natively compiled function defined in
ghostel-shell.el.
Signature
(ghostel--resolve-shell-spec)
Documentation
Return (PROGRAM . EXTRA-ARGS) for the shell to spawn.
For local sessions, splits ghostel-shell (string or list).
For remote (TRAMP) sessions, resolves PROGRAM via ghostel-tramp-shells
(see ghostel--tramp-shell-spec) and returns any explicit per-method
EXTRA-ARGS configured there. When no explicit args are configured the
caller supplies a type-aware default; see
ghostel--default-remote-shell-args.
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-shell.el
(defun ghostel--resolve-shell-spec ()
"Return (PROGRAM . EXTRA-ARGS) for the shell to spawn.
For local sessions, splits `ghostel-shell' (string or list).
For remote (TRAMP) sessions, resolves PROGRAM via `ghostel-tramp-shells'
\(see `ghostel--tramp-shell-spec') and returns any explicit per-method
EXTRA-ARGS configured there. When no explicit args are configured the
caller supplies a type-aware default; see
`ghostel--default-remote-shell-args'."
(if (file-remote-p default-directory)
(with-parsed-tramp-file-name default-directory nil
(let ((spec (or (ghostel--tramp-shell-spec method)
(ghostel--tramp-shell-spec t))))
(cons (or (car spec)
(with-connection-local-variables shell-file-name)
(car (ghostel--shell-program-and-args ghostel-shell)))
(cdr spec))))
(ghostel--shell-program-and-args ghostel-shell)))