diff --git a/scheme/scheme-commands.scm b/scheme/scheme-commands.scm index c952f33..1bb04f1 100644 --- a/scheme/scheme-commands.scm +++ b/scheme/scheme-commands.scm @@ -6,8 +6,10 @@ (cdr tokens)))) (define (scheme-command-line? command-line) - (char=? (string-ref (string-trim command-line) 0) - command-prefix)) + (let ((trimmed (string-trim command-line))) + (and (> (string-length trimmed) 0) + (char=? (string-ref trimmed 0) + command-prefix)))) (define (eval-scheme-command command args) (case (string->symbol command)