fix(eshell): "attempt to open-code ‘anonymous lambda’ with too few arguments"

Fix: #8364
Ref: #6867
Amend: c7ca3ea8cc
This commit is contained in:
Henrik Lissner
2025-04-16 03:43:05 -04:00
parent 009a285c0a
commit b4276f41f4

View File

@ -234,13 +234,10 @@ Return nil if there is none."
(let ((str (split-string (esh-help-man-string cmd) "\n")))
(if (equal (concat "No manual entry for " cmd) (car str))
(ignore (puthash cmd 'none esh-help-man-cache))
(puthash cmd
(-some->> str
(--drop-while (not (string-match-p "^SYNOPSIS$" it)))
(nth 1)
(funcall (lambda (s)
(let ((idx (string-match "[^\s\t]" s)))
(substring s idx)))))
(puthash
cmd (when-let* ((str (seq-drop-while (fn! (not (string-match-p "^SYNOPSIS$" %))) str))
(str (nth 1 str)))
(substring str (string-match-p "[^\s\t]" str)))
esh-help-man-cache))))))