Function: consult--completion-filter-dispatch
consult--completion-filter-dispatch is a natively 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 /nix/store/6higv2v1wk916v4ynnybyrdkfy2gq44d-emacs-packages-deps/share/emacs/site-lisp/elpa/consult-20261004.957/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))))