unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: prj@po.cwru.edu (Paul Jarc)
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Proposal: allow "guile foo.scm"
Date: Fri, 12 Nov 2004 10:19:37 -0500	[thread overview]
Message-ID: <m38y9714dc.fsf@multivac.cwru.edu> (raw)
In-Reply-To: <rmi654bp3bs.fsf@fnord.ir.bbn.com> (Greg Troxel's message of "12 Nov 2004 09:08:39 -0500")

>> 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 <gdt@ir.bbn.com> 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 $@?  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


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2004-11-12 15:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-11 18:26 Proposal: allow "guile foo.scm" Andy Wingo
2004-11-12 14:08 ` Greg Troxel
2004-11-12 15:19   ` Paul Jarc [this message]
2004-12-22 16:25     ` Marius Vollmer
2004-11-12 15:32   ` Jose A. Ortega Ruiz
2004-11-12 15:39     ` Paul Jarc
2004-11-12 21:43 ` Neil Jerram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m38y9714dc.fsf@multivac.cwru.edu \
    --to=prj@po.cwru.edu \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).