Fix history expansion: treat ! before closing quote as literal
ober
f0387dc84bb75bc8df7977d96c0ff7b7e8a2298e
--- a/history.ss +++ b/history.ss @@ -546,11 +546,12 @@ (display (string-ref line j) result) (qloop (+ j 1)))))) ;; ! history expansion - ((char=? (string-ref line i) #\!) - (if (or (= (+ i 1) len) - (char-whitespace? (string-ref line (+ i 1))) - (char=? (string-ref line (+ i 1)) #\=) - (char=? (string-ref line (+ i 1)) #\()) + ((char=? (string-ref line i) #\!) + (if (or (= (+ i 1) len) + (char-whitespace? (string-ref line (+ i 1))) + (char=? (string-ref line (+ i 1)) #\=) + (char=? (string-ref line (+ i 1)) #\() + (char=? (string-ref line (+ i 1)) #\")) ;; Bare ! before whitespace/=/( — not expansion (begin (display "!" result) (loop (+ i 1) result changed? print-only?))