From 4af4ee05e6a5935e881672dc90a0e8ddbf452e71 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 28 Nov 2019 06:09:21 -0800 Subject: getopts: print types in help without colon. * share/txr/stdlib/getopts.tl (opthelp): Use symbol-name to get the string representation of type keywords instead of tostringp, so there is no leading colon. In the type legend, we don't have any colon. For instance --gravity=FLOAT rather than --gravity=:FLOAT. --- share/txr/stdlib/getopts.tl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/txr/stdlib/getopts.tl b/share/txr/stdlib/getopts.tl index 9f2ec42c..a9f47d61 100644 --- a/share/txr/stdlib/getopts.tl +++ b/share/txr/stdlib/getopts.tl @@ -246,9 +246,9 @@ (put-line "\nOptions:\n") (each ((od sorted)) (let* ((type (cond - ((keywordp od.type) (upcase-str (tostringp od.type))) + ((keywordp od.type) (upcase-str (symbol-name od.type))) ((and (consp od.type) (eq (car od.type) 'list)) - (let ((ts (upcase-str (tostringp (cadr od.type))))) + (let ((ts (upcase-str (symbol-name (cadr od.type))))) `@ts[,@ts...]`)) (t "ARG"))) (long (if od.long -- cgit v1.2.3