Function: eshell-parse-range-token

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

Signature

(eshell-parse-range-token)

Documentation

Parse a range token.

This separates two integers (possibly as dollar expansions) and denotes a half-open range.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-arg.el.gz
(defun eshell-parse-range-token ()
  "Parse a range token.
This separates two integers (possibly as dollar expansions) and denotes
a half-open range."
  (when (and (not eshell-current-quoted)
             (looking-at (rx ".."))
             (or (eshell-arg-delimiter (match-end 0))
                 (save-excursion
                   (goto-char (match-end 0))
                   (looking-at (eshell--after-range-token-regexp)))))
    ;; If we parse multiple range tokens for a single argument, then
    ;; they can't actually be range tokens.  Unmark the result to
    ;; indicate this.
    (when (memq eshell--range-token
                (if eshell-arg-listified
                    eshell-current-argument
                  (list eshell-current-argument)))
      (add-hook 'eshell-current-modifiers #'eshell-unmark-range-token))
    (forward-char 2)
    eshell--range-token))