/usr/share/scheme48-1.9/env/basic-command.scm is in scheme48 1.9-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | ; Part of Scheme 48 1.9. See file COPYING for notices and license.
; Authors: Richard Kelsey, Jonathan Rees
; run
(define-command-syntax 'run "<exp>" "evaluate an expression" '(expression))
(define (run exp)
(evaluate-and-select exp (environment-for-commands)))
; exit-when-done
(define-command-syntax 'exit-when-done "[<status>]"
"leave Scheme after all threads finish"
'(&opt expression))
(define (exit-when-done . exp-option)
(let ((status (if (null? exp-option)
0
(eval (car exp-option) (environment-for-commands)))))
(terminate-command-processor! status)))
(define-command-syntax 'exit
"[<status>]"
"leave Scheme now"
'(&opt expression))
(define (exit . exp-option)
(let ((status (if (null? exp-option)
0
(eval (car exp-option) (environment-for-commands)))))
(scheme-exit-now status)))
; go
(define-command-syntax 'go "<exp>" "leave Scheme via tail recursion"
'(expression))
(define (go exp)
(let ((env (environment-for-commands)))
(exit-command-processor (lambda () (eval exp env)))))
; load
(define-command-syntax 'load "<filename> ..."
"load Scheme source file(s)"
'(&rest filename))
(define (load . filenames)
(apply really-load load-into filenames))
(define-command-syntax 'load-script "<filename> ..."
"load Scheme script(s)"
'(&rest filename))
(define (load-script . filenames)
(apply really-load load-script-into filenames))
(define (really-load load-into . filenames)
(let ((env (environment-for-commands)))
;; (with-interaction-environment env
;; (lambda ()
((if (load-noisily?)
(lambda (x) (x))
silently)
(lambda ()
(noting-undefined-variables env
(lambda ()
(for-each (lambda (filename)
(load-into filename env))
filenames)))))));; ))
; help
(define ? help)
(define-command-syntax 'help
"[<command-name>]"
"list all commands, or give help on a specific command"
'(&opt name))
(define-command-syntax '? "[<command-name>]" "same as ,help" '(&opt name))
|