SM
executable-find
, lsp заработалSize: a a a
SM
executable-find
, lsp заработалSM
VL
VL
SM
exec-path
, process-environment
, tramp-remote-process-environment
SM
eshell-path-env
обновляетSM
SM
executable-find
в конфиге оформить? Можно конечно просто defun
в недрах конфига сделать, но может, есть варианты лучше?DL
executable-find
в конфиге оформить? Можно конечно просто defun
в недрах конфига сделать, но может, есть варианты лучше?SM
executable-find
, чтобы он удалённые файлы искал помимо того списка ещё и в tramp-remote-path
SM
(defun executable-find (command &optional remote)
"Search for COMMAND in `exec-path' and return the absolute file name.
Return nil if COMMAND is not found anywhere in `exec-path'. If
REMOTE is non-nil, search on the remote host indicated by
`default-directory' instead."
(if (and remote (file-remote-p default-directory))
(let ((res (locate-file
command
(append (mapcar
(lambda (x) (concat (file-remote-p default-directory) x))
(exec-path)) tramp-remote-path)
exec-suffixes 'file-executable-p)))
(when (stringp res) (file-local-name res)))
;; Use 1 rather than file-executable-p to better match the
;; behavior of call-process.
(let ((default-directory (file-name-quote default-directory 'top)))
(locate-file command exec-path exec-suffixes 1))))
SM
DL
SM
SM
DL
(defun executable-find (command)
"Search for COMMAND in `exec-path' and return the absolute file name.
Return nil if COMMAND is not found anywhere in `exec-path'."
;; Use 1 rather than file-executable-p to better match the behavior of
;; call-process.
(locate-file command exec-path exec-suffixes 1))
DL
SM
SM