unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Formbi <formbi@protonmail.com>
To: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: env, -l and command line arguments
Date: Sat, 20 Feb 2021 22:54:31 +0000	[thread overview]
Message-ID: <AXRZbUZWod6O5iSwtV6WuQDMhvMeBPE4HSKjL2c9A6ACEhkNUS64Lc7cvjeRG7gENpzXg-VC_RcV4UNzHfi-ogVGVDbJf1gq5cjGH_UPSUk=@protonmail.com> (raw)

Hi

I'd like to make a script and be able to jump into the REPL if needed (for example if «--repl» is not passed, «(exit)» is run). I also run Guile through env -S, because I'm on Guix and I wanna make the script portable.

However, I can't find an easy way to do it. When I use «-l» and pass some command-line arguments to the script, Guile crashes because it interprets the arguments as files to load. When I use «-l --», it crashes because it can't find the «--» file. When I use «-- -l», it doesn't load the file. Even weirder to me is the fact that if I just put «(exit)» in the script, Guile doesn't crash.

I kinda managed to get the REPL functionality using some Bash shenanigans made by someone else, but shouldn't there be an easier way? Or does it exist, but I haven't stumbled upon it?



             reply	other threads:[~2021-02-20 22:54 UTC|newest]

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

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='AXRZbUZWod6O5iSwtV6WuQDMhvMeBPE4HSKjL2c9A6ACEhkNUS64Lc7cvjeRG7gENpzXg-VC_RcV4UNzHfi-ogVGVDbJf1gq5cjGH_UPSUk=@protonmail.com' \
    --to=formbi@protonmail.com \
    --cc=guile-user@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).