Function: eshell-connection-local-command

eshell-connection-local-command is a byte-compiled function defined in esh-ext.el.gz.

Signature

(eshell-connection-local-command COMMAND ARGS)

Documentation

Insert output from an external COMMAND, using ARGS.

This always runs COMMAND using the connection associated with the current working directory.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-ext.el.gz
(defun eshell-connection-local-command (command args)
  "Insert output from an external COMMAND, using ARGS.
This always runs COMMAND using the connection associated with the
current working directory."
  (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))
      (eshell-gather-process-output
       (car interp) (append (cdr interp) args)))))