]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix completion of extended "..." syntax in eshell
authorMichalis V <mvar.40k@gmail.com>
Fri, 27 Aug 2021 16:46:04 +0000 (18:46 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 27 Aug 2021 16:46:04 +0000 (18:46 +0200)
* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Expand
"..." (bug#19626).

lisp/eshell/em-cmpl.el

index cbfe0b815459c45df1c90ae47f4a85c4cb8c3933..4fd0afbeb8828bdfb0d69fd0ddc79b6cd3532167 100644 (file)
@@ -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)))