Function: eshell-parse-redirection
eshell-parse-redirection is a byte-compiled function defined in
esh-io.el.gz.
Signature
(eshell-parse-redirection)
Documentation
Parse an output redirection, such as 2>.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-io.el.gz
(defun eshell-parse-redirection ()
"Parse an output redirection, such as `2>'."
(if (and (not eshell-current-quoted)
(looking-at "\\([0-9]\\)?\\(<\\|>+\\)&?\\([0-9]\\)?\\s-*"))
(if eshell-current-argument
(eshell-finish-arg)
(let ((sh (match-string 1))
(oper (match-string 2))
; (th (match-string 3))
)
(if (string= oper "<")
(error "Eshell does not support input redirection"))
(eshell-finish-arg
(prog1
(list 'eshell-set-output-handle
(or (and sh (string-to-number sh)) 1)
(list 'quote
(aref [overwrite append insert]
(1- (length oper)))))
(goto-char (match-end 0))))))))