Rick Taube <address@hidden> wrote:
when i do guile --help i dont see it. id like to do something like:
% guile -c '(define foo 1)' -l "bar.scm" -l "bif.scm"
guile> foo
1
You can do this:
$ guile -c '(define foo 1) (load "bar.scm") (load "bif.scm")'
But I don't know how to start the REPL from Scheme code.
If your shell does process substitution, you could avoid -c, so that
guile will start the REPL as usual:
$ guile -l <(echo '(define foo 1)') -l bar.scm -l bif.scm
I then tried working with the -e option that takes a function but i
guess i do not understand
how to notate a lambda expr from the shell:
% guile -e '(lambda args (display args))'
ERROR: Unbound variable: #{\(lambda\ args\ \(display\ args\)\)}#
-e takes a *name* of an existing function, not an expression that
evaluates to a function. It's not what you want here. This works:
$ guile -c '(display (program-arguments)) (newline)'
(guile)
And this will print the arguments, and then start the REPL:
$ guile -e display -- args ...
(guile args ...)guile>
paul
_______________________________________________
Guile-user mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/guile-user