From bc7e876f6d8d8f1475e2087508b69f219dbde078 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Tue, 4 Dec 2018 10:09:38 -0500 Subject: [PATCH] Fix handling of unknown options in set * geesh/built-ins/set.scm (main): Continue processing options as new arguments (i.e., 'set -- ...') after encountering an unknown option. --- geesh/built-ins/set.scm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/geesh/built-ins/set.scm b/geesh/built-ins/set.scm index 4088f9e..1e0b87f 100644 --- a/geesh/built-ins/set.scm +++ b/geesh/built-ins/set.scm @@ -85,10 +85,7 @@ ((#\+ (? option-letter? chr)) (setopt! (assoc-ref *option-letters* chr) #f) (loop args)) - (_ (format (current-error-port) - "~a: set: invalid option ~s~%" - (car (program-arguments)) op) - EXIT_FAILURE))) + (_ (loop (cons* "--" op args))))) (_ (format (current-error-port) "~a: set: invalid options ~s~%" (car (program-arguments)) args)