> * VAUCHER L Ext SIRES <yinhpure.rkg@...> [2004-06-30 11:14:00 +0200]:
>
> My problem is with -i and the 'terminal' lisp-file argument.
>
> When I use only the terminal lisp-file argument, everything
> works as expected : the first line (#!/.../clisp) is not
> interpreted as lisp code, my RC file is not loaded, command-
> line arguments situated after the lisp-file name are available
> in ext:*args* and when the file is loaded, clisp terminates.
> Example: 'clisp toto.lisp 1 2 3'
>
> But as soon as I try using a -i initfile option in my command
> line, it does not work anymore as above :
> - the #! line in the lisp-file causes a read error,
> - my RC file is loaded prior to everything else, even the initfile,
> - no command-line arguments are available (ext:*args* is NIL),
> - worse, trailing command-line arguments are interpreted as
> lisp files to be loaded
> - and finally, clisp enters a REPL.
> Example: 'clisp -i initfile.lisp toto.lisp 1 2 3'
>
> There is no indication of incompatibility between -i options and the
> terminal lisp-file argument in the man, so I am a bit surprised.
what incompatibility?
these are entirely different options, completely unrelated.
> Is it a bug? Is it an 'undocumented feature'? Is there some
> workaround available?
this is precisely the intended behavior, as documented.
"-i" means load an "init" lisp file and proceed to repl or script
"terminal" means a lisp script: execute standalone.
these are different options with different purposes.
if you are familiar with bash, you might find the following simile
helpful: "-i foo.lisp" corresponds to ". foo.sh" (or "source foo.csh"),
while the "script" or as you call it "terminal" option corresponds to
running a shell script.
--
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
My other CAR is a CDR.
|