diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-11-28 06:09:21 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-11-28 06:09:21 -0800 |
commit | 18bbe6a0ae4d12bc8956850c4d94f28455c4f448 (patch) | |
tree | 4b59f647821b52511efe98764cbb9eabda04ffdf | |
parent | 90ad8cfd480c868b58bd054896910851971cf010 (diff) | |
download | txr-18bbe6a0ae4d12bc8956850c4d94f28455c4f448.tar.gz txr-18bbe6a0ae4d12bc8956850c4d94f28455c4f448.tar.bz2 txr-18bbe6a0ae4d12bc8956850c4d94f28455c4f448.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.tl | 4 |
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 |