diff options
-rw-r--r-- | share/txr/stdlib/getopts.tl | 6 | ||||
-rw-r--r-- | txr.1 | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/share/txr/stdlib/getopts.tl b/share/txr/stdlib/getopts.tl index 3454b73f..21d892c7 100644 --- a/share/txr/stdlib/getopts.tl +++ b/share/txr/stdlib/getopts.tl @@ -32,7 +32,7 @@ helptext arg-p (type :bool) - (:static valid-types '(:bool :dec :hex :oct :cint :float :str)) + (:static valid-types '(:bool :dec :hex :oct :cint :float :str :text)) (:postinit (me) me.(check) (set me.arg-p (neq me.type :bool)))) @@ -125,6 +125,7 @@ (or (ignerr (read `"@{me.arg}"`)) (sys:opt-err "option ~a needs string lit syntax, ~a given" name me.arg)))) + (:text) (t (cond ((and (consp type) (eq (car type) 'list)) (let* ((rec-type (cadr type)) @@ -332,6 +333,7 @@ \ 3., .5, .12e9, 53.e-3, 3e-015") (:str " STR - String with embedded escapes, valid\ \ as TXR Lisp string literals\n\ - \ syntax: foo, foo\\tbar, abc\\nxyz")))) + \ syntax: foo, foo\\tbar, abc\\nxyz") + (:text " TEXT - Unprocessed text")))) (put-line ln))) (put-line)))) @@ -47137,6 +47137,10 @@ or .code E followed by a decimal integer which may have a leading positive or negative sign, and include leading zeros. +.coIP :text +This type indicates a simple textual argument. The argument is taken as +verbatim UTF-8 text, converted to a string without interpreting +the characters in any special way. .coIP :str This type indicates that the argument consists of the interior notation of a TXR Lisp character string. It is processed by adding a double quote |