mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-01 04:26:47 +01:00
- [gemini] complete URL on command line matching substring in any position, not only at the start of the URL.
This commit is contained in:
parent
29ccc502db
commit
07d04f760a
@ -102,6 +102,11 @@ completed) and the common prefix of the completion string."
|
||||
(lambda (a)
|
||||
(text-utils:string-starts-with-p hint a)))
|
||||
|
||||
(defun contains-clsr (hint)
|
||||
(let ((scanner (cl-ppcre:create-scanner hint)))
|
||||
(lambda (a)
|
||||
(cl-ppcre:scan scanner a))))
|
||||
|
||||
(defun remove-if-hidden (candidates)
|
||||
(remove-if #'db:hidden-recipient-p candidates))
|
||||
|
||||
@ -173,7 +178,7 @@ list af all possible candidtae for completion."
|
||||
|
||||
(defun make-complete-gemini-iri-fn (prompt)
|
||||
(lambda (hint)
|
||||
(when-let ((matched (remove-if-not (starts-with-clsr hint)
|
||||
(when-let ((matched (remove-if-not (contains-clsr hint)
|
||||
(remove-duplicates (funcall #'db:history-prompt->values
|
||||
prompt)
|
||||
:test #'string=))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user