From: Michalis V Date: Fri, 27 Aug 2021 16:46:04 +0000 (+0200) Subject: Fix completion of extended "..." syntax in eshell X-Git-Tag: emacs-28.0.90~1285 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9224a863192b1317ef307bcc76abfdfbad73b796;p=emacs.git Fix completion of extended "..." syntax in eshell * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Expand "..." (bug#19626). --- diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index cbfe0b81545..4fd0afbeb88 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -72,6 +72,7 @@ (require 'esh-mode) (require 'esh-util) +(require 'em-dirs) (eval-when-compile (require 'cl-lib) @@ -377,8 +378,12 @@ to writing a completion function." (cl-assert (eq (car result) 'quote)) (cadr result)) arg))) - (if (numberp val) - (setq val (number-to-string val))) + (cond ((numberp val) + (setq val (number-to-string val))) + ;; expand .../ etc that only eshell understands to + ;; standard ../../ + ((string-match "\\.\\.\\.+/" val) + (setq val (eshell-expand-multiple-dots val)))) (or val ""))) args) posns)))