Skip to content

Commit 72e9fce

Browse files
committed
Properly apply filter passed to the dynamic completion function.
fixes #43 helm-mode was broken because it uses a predicate
1 parent 054ecdf commit 72e9fce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bash-completion.el

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,12 @@ using the current Emacs completion style."
15801580
(setq last-error err)
15811581
(signal (car err) (cdr err)))))))))
15821582
(setq last-result result)
1583-
(let ((filtered-result (if predicate (mapcar predicate result) result))
1583+
(let ((filtered-result (if predicate
1584+
(delq nil (mapcar
1585+
(lambda (elt)
1586+
(when (funcall predicate elt) elt))
1587+
result))
1588+
result))
15841589
(completion-ignore-case (process-get process 'completion-ignore-case)))
15851590
(cond
15861591
((null action) (try-completion "" filtered-result))

0 commit comments

Comments
 (0)