diff --git a/scsh/top.scm b/scsh/top.scm index 4ae6c7b..42f3621 100644 --- a/scsh/top.scm +++ b/scsh/top.scm @@ -107,7 +107,7 @@ (define (parse-scsh-args args) (let lp ((args (meta-arg-process-arglist args)) (switches '()) ; A list of handler thunks - (top-entry #f) ; -t + (top-entry #f) ; -e (need-script? #f)) ; Found a -ds, -dm, or -de? ; (display args (current-output-port)) (if (pair? args) @@ -115,31 +115,47 @@ (args (cdr args))) (cond ((string=? arg "-c") - (if (or need-script? top-entry (not (pair? args))) - (bad-arg) - (values (reverse switches) 'c (car args) - top-entry (cdr args)))) + (cond ((not (pair? args)) + (bad-arg "-c switch requires argument")) + (top-entry + (bad-arg "-c switch used with -e switch")) + (need-script? + (bad-arg "-ds, -dm, or -de switch requires -s