From 17b994a59e1c294292faccefc2a03c36828e5d46 Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Sat, 12 Feb 2022 15:38:10 +0000 Subject: getopts: include list/cumul subtypes in legend. * stdlib/getopts.tl (opthelp-types): Consider list and cumul types when searching for types to include in the legend. --- stdlib/getopts.tl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'stdlib') diff --git a/stdlib/getopts.tl b/stdlib/getopts.tl index aa6ba4ab..9d39c012 100644 --- a/stdlib/getopts.tl +++ b/stdlib/getopts.tl @@ -368,7 +368,12 @@ (defun opthelp-types (opt-desc-list : (*stdout* *stdout*)) (let ((documented (remove-if (op null @1.helptext) opt-desc-list))) (whenlet ((types (keep-if [andf keywordp (op neq :bool)] - (uniq (mapcar (usl type) documented))))) + (uniq (mapcar (chain (usl type) + (ldo match-ecase + ((@(or list cumul) @type) + @(rec type)) + (@type type))) + documented))))) (put-line "Type legend:\n") (each ((ty types)) (iflet ((ln (caseql ty -- cgit v1.2.3