Function: consult--completion-filter-dispatch
consult--completion-filter-dispatch is a byte-compiled function
defined in consult.el.
Signature
(consult--completion-filter-dispatch PATTERN CANDS CATEGORY HIGHLIGHT)
Documentation
Filter CANDS with PATTERN with optional complement.
Either using consult--completion-filter or
consult--completion-filter-complement, depending on if the pattern starts
with a bang. See consult--completion-filter for the arguments CATEGORY and
HIGHLIGHT.
Source Code
;; Defined in ~/.emacs.d/elpa/consult-20260805.1130/consult.el
(defun consult--completion-filter-dispatch (pattern cands category highlight)
"Filter CANDS with PATTERN with optional complement.
Either using `consult--completion-filter' or
`consult--completion-filter-complement', depending on if the pattern starts
with a bang. See `consult--completion-filter' for the arguments CATEGORY and
HIGHLIGHT."
(cond
((string-match-p "\\`!? ?\\'" pattern) cands) ;; empty pattern
((string-prefix-p "! " pattern) (consult--completion-filter-complement
(substring pattern 2) cands category))
(t (consult--completion-filter pattern cands category highlight))))