diff --git a/gash/environment.scm b/gash/environment.scm index 519ceaa..6443d3f 100644 --- a/gash/environment.scm +++ b/gash/environment.scm @@ -1,5 +1,6 @@ ;;; Gash -- Guile As SHell ;;; Copyright © 2018, 2019 Timothy Sample +;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of Gash. ;;; @@ -71,7 +72,12 @@ (define (set-status! n) "Set the current status." - (set! *status* n)) + (match n + ((? number?) + (set! *status* n)) + (#t (set-status! 0)) + (#f (set-status! 1)) + (_ (throw 'invalid-status n)))) (define *root-pid* (getpid))