summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-11-28 06:09:21 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-11-28 06:09:21 -0800
commit4af4ee05e6a5935e881672dc90a0e8ddbf452e71 (patch)
tree4b59f647821b52511efe98764cbb9eabda04ffdf
parent63f55d5881cdd7c8079b0de2722ed503273a3a29 (diff)
downloadtxr-4af4ee05e6a5935e881672dc90a0e8ddbf452e71.tar.gz
txr-4af4ee05e6a5935e881672dc90a0e8ddbf452e71.tar.bz2
txr-4af4ee05e6a5935e881672dc90a0e8ddbf452e71.zip
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.
-rw-r--r--share/txr/stdlib/getopts.tl4
1 files 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