emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9224a86: Fix completion of extended "..." syntax in eshell


From: Lars Ingebrigtsen
Subject: master 9224a86: Fix completion of extended "..." syntax in eshell
Date: Fri, 27 Aug 2021 12:48:56 -0400 (EDT)

branch: master
commit 9224a863192b1317ef307bcc76abfdfbad73b796
Author: Michalis V <mvar.40k@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix completion of extended "..." syntax in eshell
    
    * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Expand
    "..." (bug#19626).
---
 lisp/eshell/em-cmpl.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el
index cbfe0b8..4fd0afb 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]