]> git.eshelyaron.com Git - emacs.git/commitdiff
; Return t or nil for 'test-completion' of Eshell user references
authorJim Porter <jporterbugs@gmail.com>
Thu, 23 Feb 2023 23:13:38 +0000 (15:13 -0800)
committerJim Porter <jporterbugs@gmail.com>
Thu, 23 Feb 2023 23:13:38 +0000 (15:13 -0800)
* lisp/eshell/em-dirs.el (eshell-complete-user-reference): Simply call
'test-completion' when ACTION is 'lambda'; don't modify the result.

lisp/eshell/em-dirs.el

index b47bd12c0f09ab93531cb557da0003d8deed8398..eb679b80cb58429e1487aa8707ee4013d96a4914 100644 (file)
@@ -290,10 +290,10 @@ Thus, this does not include the current directory.")
         (throw 'pcomplete-completions
                ;; Provide a programmed completion table.  This works
                ;; just like completing over the list of names, except
-               ;; it always returns the completed string, never `t'.
-               ;; That's because this is only completing a directory
-               ;; name, and so the completion isn't actually finished
-               ;; yet.
+               ;; it always returns the completed string for
+               ;; `try-completion', never `t'.  That's because this is
+               ;; only completing a directory name, and so the
+               ;; completion isn't actually finished yet.
                (lambda (string pred action)
                  (pcase action
                    ('nil                  ; try-completion
@@ -302,8 +302,7 @@ Thus, this does not include the current directory.")
                    ('t                    ; all-completions
                     (all-completions string names pred))
                    ('lambda               ; test-completion
-                     (let ((result (test-completion string names pred)))
-                       (if (eq result t) string result)))
+                    (test-completion string names pred))
                    ('metadata
                     '(metadata (category . file)))
                    (`(boundaries . ,suffix)