mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-01 08:17:38 +00:00
Handle integer indices for eshell variables (Bug#26055)
* lisp/eshell/esh-var.el (eshell-index-value): Convert index to number if it's been marked as one, just like `eshell-lisp-command' does.
This commit is contained in:
parent
49c0ff29c2
commit
27c194995b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user