Function: eshell-parse-number

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

Signature

(eshell-parse-number)

Documentation

Parse a numeric argument.

Eshell can treat unquoted arguments matching eshell-number-regexp as their numeric values.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-arg.el.gz
(defun eshell-parse-number ()
  "Parse a numeric argument.
Eshell can treat unquoted arguments matching `eshell-number-regexp' as
their numeric values."
  (when (and (not eshell-current-argument)
             (not eshell-current-quoted)
             (looking-at eshell-number-regexp)
             (eshell-arg-delimiter (match-end 0)))
    (goto-char (match-end 0))
    (let ((str (match-string 0)))
      (add-text-properties 0 (length str) '(number t) str)
      str)))