diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index fe1f1188c88..cdd05bd7e9a 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -563,6 +563,8 @@ For example, to retrieve the second element of a user's record in (defun eshell-index-value (value index) "Reference VALUE using the given INDEX." + (when (and (stringp index) (get-text-property 0 'number index)) + (setq index (string-to-number index))) (if (stringp index) (cdr (assoc index value)) (cond