Function: eshell-parse-delimiter

eshell-parse-delimiter is a byte-compiled function defined in esh-arg.el.gz.

Signature

(eshell-parse-delimiter)

Documentation

Parse a command 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 a command delimiter, which is essentially a command operator."
  ;; this `eshell-operator' keyword gets parsed out by
  ;; `eshell-split-commands'.  Right now the only possibility for
  ;; error is an incorrect output redirection specifier.
  (when (looking-at (rx (group (or "&" "|" ";" "\n" "&&" "||"))
                        (* (syntax whitespace))))
    (if eshell-current-argument
	(eshell-finish-arg)
      (let ((operator (match-string 1)))
        (when (string= operator "\n")
          (setq operator ";"))
        (eshell-finish-arg
         (prog1
	     `(eshell-operator ,operator)
	   (goto-char (match-end 0))))))))