diff options
author | Paul A. Patience <paul@apatience.com> | 2022-02-12 15:38:10 +0000 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-02-12 14:08:28 -0800 |
commit | 5864479969b4e4c19e3595fd90038f5f05a5a85b (patch) | |
tree | 365bb5f85f3b23bde4e4d301c91f306de756030a | |
parent | 25f5433ad858fafd93ef72112d85d11df147af49 (diff) | |
download | txr-5864479969b4e4c19e3595fd90038f5f05a5a85b.tar.gz txr-5864479969b4e4c19e3595fd90038f5f05a5a85b.tar.bz2 txr-5864479969b4e4c19e3595fd90038f5f05a5a85b.zip |
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.
-rw-r--r-- | stdlib/getopts.tl | 7 |
1 files changed, 6 insertions, 1 deletions
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 |