1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-01 08:17:38 +00:00

eshell-complete-parse-arguments: don't use string-match on a list

When there is more than one candidate for completion, `val' is a list.

Fixes bug#52794.

* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): protect
use of string-match with stringp.
This commit is contained in:
Óscar Fuentes 2021-12-27 16:01:09 +01:00
parent d4e2850b32
commit ea65de7577

View File

@ -382,7 +382,7 @@ to writing a completion function."
(setq val (number-to-string val))) (setq val (number-to-string val)))
;; expand .../ etc that only eshell understands to ;; expand .../ etc that only eshell understands to
;; standard ../../ ;; standard ../../
((string-match "\\.\\.\\.+/" val) ((and (stringp val)) (string-match "\\.\\.\\.+/" val)
(setq val (eshell-expand-multiple-dots val)))) (setq val (eshell-expand-multiple-dots val))))
(or val ""))) (or val "")))
args) args)