Commit 8634b66a authored by John Wiegley's avatar John Wiegley
Browse files

(eshell-parse-argument-hook): If a number is encountered as an

argument, don't convert it right away, but tag the first character of
the string with the text properties `number', which signifies to
`eshell-lisp-command' that the argument should be passed through
`string-to-number' if it is actually used in the call to a Lisp
parent b2c102f3
......@@ -52,7 +52,10 @@ yield the values intended."
(looking-at eshell-number-regexp)
(eshell-arg-delimiter (match-end 0)))
(goto-char (match-end 0))
(string-to-number (match-string 0)))))
(let ((str (match-string 0)))
(if (> (length str) 0)
(add-text-properties 0 1 '(number t) str))
;; parse any non-special characters, based on the current context
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment