Function: eshell--find-subcommands
eshell--find-subcommands is a byte-compiled function defined in
esh-cmd.el.gz.
Signature
(eshell--find-subcommands HAYSTACK)
Documentation
Recursively search for subcommand forms in HAYSTACK.
This yields the SUBCOMMANDs when found in forms like
"(eshell-as-subcommand SUBCOMMAND)".
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-cmd.el.gz
(iter-defun eshell--find-subcommands (haystack)
"Recursively search for subcommand forms in HAYSTACK.
This yields the SUBCOMMANDs when found in forms like
\"(eshell-as-subcommand SUBCOMMAND)\"."
(dolist (elem haystack)
(cond
((eq (car-safe elem) 'eshell-as-subcommand)
(iter-yield (cdr elem)))
((listp elem)
(iter-yield-from (eshell--find-subcommands elem))))))