From 9224a863192b1317ef307bcc76abfdfbad73b796 Mon Sep 17 00:00:00 2001 From: Michalis V Date: Fri, 27 Aug 2021 18:46:04 +0200 Subject: [PATCH] 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 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))) -- 2.39.2