[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposal: allow "guile foo.scm"
From: |
Paul Jarc |
Subject: |
Re: Proposal: allow "guile foo.scm" |
Date: |
Fri, 12 Nov 2004 10:19:37 -0500 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) |
>> What do you think of allowing guile to be run as "guile foo.scm"?
This has come up before. It may already be in CVS; I don't remember.
Greg Troxel <address@hidden> wrote:
> But, I think your example fails to pass arguments to the guile
> process.
The kernel supplies the arguments. Try it with "#!/usr/bin/env echo".
> Do you mean to include $0 address@hidden Why can't you do
>
> #! /usr/bin/env guile -s $0 "$@"
> !#
Only one argument (in this case, "guile") can be included in the #!
line, or else you'll get different behavior on different platforms.
Some would give you a single argument containing 'guile -s $0 "$@"';
some would give you a just "guile"; perhaps there are some that would
give you "guile", "-s", "$0", and '"$@"' as separate arguments. But
none of them will substitute the appropriate values for $0 and $@,
because this line is interpreted by the kernel, not the shell.
paul