[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
env, -l and command line arguments
From: |
Formbi |
Subject: |
env, -l and command line arguments |
Date: |
Sat, 20 Feb 2021 22:54:31 +0000 |
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?
- env, -l and command line arguments,
Formbi <=