Improved str->arg to quote arguments with * characters as well as spaces.

(Okay, now everyone reading the log file knows one character in my password.)

original commit: 238ace92fd00a3f8db5dd5fbc1613ceca0a51baa
This commit is contained in:
Paul Graunke 2002-04-22 19:08:19 +00:00
parent 0decca5d57
commit 07256f94ff

View File

@ -160,8 +160,9 @@
(log-warning "warning: unexpected response for ~a: ~a" id l)
(loop)])))))
; str->arg is still not quite right. It should use {n}crnl prefixes.
(define (str->arg s)
(if (or (regexp-match " " s)
(if (or (regexp-match "[ *]" s)
(string=? s ""))
(format "\"~a\"" s)
s))