Function: consult--man-format
consult--man-format is a natively compiled function defined in
consult.el.
Signature
(consult--man-format LINES)
Documentation
Format man candidates from LINES.
Source Code
;; Defined in /nix/store/6higv2v1wk916v4ynnybyrdkfy2gq44d-emacs-packages-deps/share/emacs/site-lisp/elpa/consult-20261004.957/consult.el
(defun consult--man-format (lines)
"Format man candidates from LINES."
(let ((candidates))
(save-match-data
(dolist (str lines)
(when (string-match "\\`\\(.*?\\([^ ]+\\) *(\\([^,)]+\\)[^)]*).*?\\) +- +\\(.*\\)\\'" str)
(let* ((names (match-string 1 str))
(name (match-string 2 str))
(section (match-string 3 str))
(desc (match-string 4 str))
(cand (format "%s - %s" names desc)))
(add-text-properties 0 (length names)
(list 'face 'consult-file
'consult-man (concat section " " name))
cand)
(push cand candidates)))))
(nreverse candidates)))