[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61221: 30.0.50; [PATCH] Support completion of quoted variable refs i
From: |
Stefan Monnier |
Subject: |
bug#61221: 30.0.50; [PATCH] Support completion of quoted variable refs in Eshell |
Date: |
Thu, 23 Feb 2023 17:39:02 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>>> + ('lambda ; test-completion
>>> + (let ((result (test-completion string names pred)))
>>> + (if (eq result t) string result)))
>> Hmm... why not just always return `result`?
>
> As I understand it, returning 't' means "there is just one matching
> completion, and the match is exact"[1], but in this case, that's not really
> true: after completing "~user/" there are still more matching completions
> (the contents of the user's home directory).
What you describe is for `try-completion`, not `test-completion`.
> This is really just trying to match what happens when calling
> 'completion-file-name-table':
>
> (completion-file-name-table "~user/" nil nil)
> => "~user/"
>
> (try-completion "~user/" '("~user/") nil)
> => t
The `action` arg is not `lambda` is these examples.
Stefan