aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/eshell/em-cmpl.el24
1 files changed, 13 insertions, 11 deletions
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el
index d1c7e81090a..acbf206a3c6 100644
--- a/lisp/eshell/em-cmpl.el
+++ b/lisp/eshell/em-cmpl.el
@@ -386,17 +386,19 @@ to writing a completion function."
386 ;; Convert arguments to forms that Pcomplete can understand. 386 ;; Convert arguments to forms that Pcomplete can understand.
387 (cons (mapcar 387 (cons (mapcar
388 (lambda (arg) 388 (lambda (arg)
389 (cond 389 (pcase arg
390 ((numberp arg) 390 ;; Expand ".../" etc that only Eshell understands to
391 (number-to-string arg)) 391 ;; the standard "../../".
392 ;; Expand ".../" etc that only Eshell understands to the 392 ((rx ".." (+ ".") "/")
393 ;; standard "../../". 393 (propertize (eshell-expand-multiple-dots arg)
394 ((and (stringp arg) (string-match "\\.\\.\\.+/" arg)) 394 'pcomplete-arg-value arg))
395 (eshell-expand-multiple-dots arg)) 395 ((pred stringp)
396 ((null arg) 396 arg)
397 "") 397 ('nil
398 (t 398 (propertize "" 'pcomplete-arg-value arg))
399 arg))) 399 (_
400 (propertize (eshell-stringify arg)
401 'pcomplete-arg-value arg))))
400 args) 402 args)
401 posns))) 403 posns)))
402 404