From: VAUCHER L Ext SIRES <lvaucher.ext@fr...> - 2004-06-30 14:08:12
>these are entirely different options, completely unrelated.
That's what I hoped for.
>"-i" means load an "init" lisp file and proceed to repl or script
This is precisely not what I get. It seems that the -i
option automatically triggers the REPL mode and forbids the
I'll try to explain what I get and what I thought I'd get after
reading the docs.
Suppose I've got an init file called "initfile.lisp" that
does --you guess-- some initialization work, like setting
some custom variables or such things.
Suppose, then, that I've got another file that I wish to use
as a script (the name is definitely better that my 'terminal'
thing attempt). This script really 'drives' the program and
as such, needs to have access to remaining command-line
arguments. After parsing those arguments, the script proceeds
to real work. I call this file "script.lisp".
Well, what I would like to do is run the script after having
done some initialization. So I type at the shell prompt
# clisp -i initfile.lisp script.lisp arg1 arg2
What I hoped was that the [-i initfile.lisp] arguments
were taken together as meaning 'load the initfile.lisp
file before anything else', and the [script.lisp arg1 arg2]
part as meaning 'run script.lisp as a script, with arguments
arg1 and arg2 in ext:*args*' and exit when done.
What I get is that 'initfile.lisp' 'script.lisp' 'arg1'
and 'arg2' are all treated as if they had been specified
as -i initfile.lisp -i script.lisp -i arg1 -i arg2,
which is definitely not what I thought.
I also tried
# clisp -i initfile.lisp -q script.lisp arg1 arg2
thinking that maybe another option in between file
names would make my intent clearer to clisp arguments
interpretation, but the result is the same.
I hope I have made my 'question' clearer than it was in
the initial post.