Function: eshell-external-command
eshell-external-command is a byte-compiled function defined in
esh-ext.el.gz.
Signature
(eshell-external-command COMMAND ARGS)
Documentation
Insert output from an external COMMAND, using ARGS.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-ext.el.gz
(defun eshell-external-command (command args)
"Insert output from an external COMMAND, using ARGS."
(setq args (eshell-stringify-list (flatten-tree args)))
(let ((interp (eshell-find-interpreter
command
args
;; `eshell-find-interpreter' does not work correctly
;; for Tramp file name syntax. But we don't need to
;; know the interpreter in that case, therefore the
;; check is suppressed.
(or (and (stringp command) (file-remote-p command))
(file-remote-p default-directory)))))
(cl-assert interp)
(if (functionp (car interp))
(apply (car interp) (append (cdr interp) args))
(require 'esh-proc)
(declare-function eshell-gather-process-output "esh-proc" (command args))
(eshell-gather-process-output
(car interp) (append (cdr interp) args)))))