Function: eshell-set-output-handle
eshell-set-output-handle is a byte-compiled function defined in
esh-io.el.gz.
Signature
(eshell-set-output-handle INDEX MODE &optional TARGET)
Documentation
Set handle INDEX, using MODE, to point to TARGET.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-io.el.gz
(defun eshell-set-output-handle (index mode &optional target)
"Set handle INDEX, using MODE, to point to TARGET."
(when target
(if (and (stringp target)
(string= target (null-device)))
(aset eshell-current-handles index nil)
(let ((where (eshell-get-target target mode))
(current (car (aref eshell-current-handles index))))
(if (and (listp current)
(not (member where current)))
(setq current (append current (list where)))
(setq current (list where)))
(if (not (aref eshell-current-handles index))
(aset eshell-current-handles index (cons nil 1)))
(setcar (aref eshell-current-handles index) current)))))