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,14 +234,11 @@ Return nil if there is none."
(let ((str (split-string (esh-help-man-string cmd) "\n"))) (let ((str (split-string (esh-help-man-string cmd) "\n")))
(if (equal (concat "No manual entry for " cmd) (car str)) (if (equal (concat "No manual entry for " cmd) (car str))
(ignore (puthash cmd 'none esh-help-man-cache)) (ignore (puthash cmd 'none esh-help-man-cache))
(puthash cmd (puthash
(-some->> str cmd (when-let* ((str (seq-drop-while (fn! (not (string-match-p "^SYNOPSIS$" %))) str))
(--drop-while (not (string-match-p "^SYNOPSIS$" it))) (str (nth 1 str)))
(nth 1) (substring str (string-match-p "[^\s\t]" str)))
(funcall (lambda (s) esh-help-man-cache))))))
(let ((idx (string-match "[^\s\t]" s)))
(substring s idx)))))
esh-help-man-cache))))))
(use-package! eshell-did-you-mean (use-package! eshell-did-you-mean