Function: eshell-parse-delimiter
eshell-parse-delimiter is a byte-compiled function defined in
esh-arg.el.gz.
Signature
(eshell-parse-delimiter)
Documentation
Parse an argument delimiter, which is essentially a command operator.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-arg.el.gz
(defun eshell-parse-delimiter ()
"Parse an argument delimiter, which is essentially a command operator."
;; this `eshell-operator' keyword gets parsed out by
;; `eshell-separate-commands'. Right now the only possibility for
;; error is an incorrect output redirection specifier.
(when (looking-at "[&|;\n]\\s-*")
(let ((end (match-end 0)))
(if eshell-current-argument
(eshell-finish-arg)
(eshell-finish-arg
(prog1
(list 'eshell-operator
(cond
((eq (char-after end) ?\&)
(setq end (1+ end)) "&&")
((eq (char-after end) ?\|)
(setq end (1+ end)) "||")
((eq (char-after) ?\n) ";")
(t
(char-to-string (char-after)))))
(goto-char end)))))))