summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
authorMichalis V <mvar.40k@gmail.com>2021-08-27 18:46:04 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-08-27 18:46:04 +0200
commit9224a863192b1317ef307bcc76abfdfbad73b796 (patch)
treee3be1358ee2c0eb845adbc4967ae1811ab163fb7 /lisp/eshell
parente26d628a4ea197d1e1ae39f51c5ebaecec4f6483 (diff)
downloademacs-9224a863192b1317ef307bcc76abfdfbad73b796.tar.gz
emacs-9224a863192b1317ef307bcc76abfdfbad73b796.tar.bz2
emacs-9224a863192b1317ef307bcc76abfdfbad73b796.zip
Fix completion of extended "..." syntax in eshell
* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Expand "..." (bug#19626).
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-cmpl.el9
1 files 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)))