Function: eshell-parse-subcommand-argument

eshell-parse-subcommand-argument is a byte-compiled function defined in esh-cmd.el.gz.

Signature

(eshell-parse-subcommand-argument)

Documentation

Parse a subcommand argument of the form {command}.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-cmd.el.gz
(defun eshell-parse-subcommand-argument ()
  "Parse a subcommand argument of the form `{command}'."
  (if (and (not eshell-current-argument)
	   (not eshell-current-quoted)
	   (eq (char-after) ?\{)
	   (or (= (point-max) (1+ (point)))
	       (not (eq (char-after (1+ (point))) ?\}))))
      (let ((end (eshell-find-delimiter ?\{ ?\})))
        (unless end
          (throw 'eshell-incomplete "{"))
        (when (eshell-arg-delimiter (1+ end))
          (prog1
              `(eshell-as-subcommand
                ,(eshell-parse-command (cons (1+ (point)) end)))
            (goto-char (1+ end)))))))