unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Formbi via General Guile related discussions <guile-user@gnu.org>
To: Nala Ginrut <nalaginrut@gmail.com>
Cc: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: Re: env, -l and command line arguments
Date: Sun, 21 Feb 2021 21:45:36 +0000	[thread overview]
Message-ID: <gR4ujFBp5qjkKVC7ZZwCOQGK9Hai60_b_UpgMavnLrd-4896XijoQqUPL7wfTmw2hGVZxPSdMpGomXnYf6WO0EqaP6c2lwWngtO-gqRYK4Q=@protonmail.com> (raw)
In-Reply-To: <CAPjoZofs1K9RovnFaCj8y-juJHSyC0mpaA2hGvYw2GL5K3khfQ@mail.gmail.com>

Hi

> I find it's not easy to understand what you want to do, could you give us an example?

I wanted to be able to do something like that:
(unless
(or
(member "-r" (command-line))
(member "--repl" (command-line)))

(begin
(display "foo")
(newline)
(exit)))

And I figured out how to do it (and it's even more portable):
#!/bin/sh
exec guile -l "$0" -- "$@"
!#

      reply	other threads:[~2021-02-21 21:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-20 22:54 env, -l and command line arguments Formbi
2021-02-21  4:13 ` Nala Ginrut
2021-02-21 21:45   ` Formbi via General Guile related discussions [this message]

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='gR4ujFBp5qjkKVC7ZZwCOQGK9Hai60_b_UpgMavnLrd-4896XijoQqUPL7wfTmw2hGVZxPSdMpGomXnYf6WO0EqaP6c2lwWngtO-gqRYK4Q=@protonmail.com' \
    --to=guile-user@gnu.org \
    --cc=formbi@protonmail.com \
    --cc=nalaginrut@gmail.com \
    /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).