Function: eshell-parse-indices

eshell-parse-indices is a byte-compiled function defined in esh-var.el.gz.

Signature

(eshell-parse-indices)

Documentation

Parse and return a list of index-lists.

This produces a series of Lisp forms to be processed by eshell-prepare-indices and ultimately evaluated by eshell-do-eval.

For example, "[0 1][2]" becomes:
  (("0" "1") ("2")).

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-var.el.gz
(defun eshell-parse-indices ()
  "Parse and return a list of index-lists.
This produces a series of Lisp forms to be processed by
`eshell-prepare-indices' and ultimately evaluated by
`eshell-do-eval'.

For example, \"[0 1][2]\" becomes:
  ((\"0\" \"1\") (\"2\"))."
  (let (indices)
    (while (eq (char-after) ?\[)
      (let ((end (eshell-find-delimiter ?\[ ?\])))
	(if (not end)
            (throw 'eshell-incomplete "[")
	  (forward-char)
          (eshell-with-temp-command (or (eshell-unescape-inner-double-quote end)
                                        (cons (point) end))
	    (let (eshell-glob-function (eshell-current-quoted nil))
	      (setq indices (cons (eshell-parse-arguments
                                   (point-min) (point-max))
				  indices))))
	  (goto-char (1+ end)))))
    (nreverse indices)))