From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Formbi Newsgroups: gmane.lisp.guile.user Subject: env, -l and command line arguments Date: Sat, 20 Feb 2021 22:54:31 +0000 Message-ID: Reply-To: Formbi Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31318"; mail-complaints-to="usenet@ciao.gmane.io" To: "guile-user@gnu.org" Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Feb 21 00:43:09 2021 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDbu1-00083w-RS for guile-user@m.gmane-mx.org; Sun, 21 Feb 2021 00:43:09 +0100 Original-Received: from localhost ([::1]:59730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDbu0-0004et-MS for guile-user@m.gmane-mx.org; Sat, 20 Feb 2021 18:43:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDb98-00061L-F9 for guile-user@gnu.org; Sat, 20 Feb 2021 17:54:42 -0500 Original-Received: from mail-40138.protonmail.ch ([185.70.40.138]:33836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDb95-0000QG-VV for guile-user@gnu.org; Sat, 20 Feb 2021 17:54:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1613861675; bh=CwO8N/aKAfJ/A4mRwqDtoFazLNjE8hvjL95J2g23iA0=; h=Date:To:From:Reply-To:Subject:From; b=FvNrW5XjtiQ6Kc1vAH6CdhJKvGmtubZgc17gBwIMo2y+Hi0AerAP3gb/BJWbiRnyl ywCFBKeVQey/0sbNR13jeHuGaU/BnIPAOhsvqoirXtS6Cul/LaK4vGTJdW4c+KC+Rm EXFWCtW347UeMiogb0TJf73kG/BRjAe337mRZGGU= Received-SPF: pass client-ip=185.70.40.138; envelope-from=formbi@protonmail.com; helo=mail-40138.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 20 Feb 2021 18:42:47 -0500 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17287 Archived-At: Hi I'd like to make a script and be able to jump into the REPL if needed (for = example if =C2=AB--repl=C2=BB is not passed, =C2=AB(exit)=C2=BB is run). I = also run Guile through env -S, because I'm on Guix and I wanna make the scr= ipt portable. However, I can't find an easy way to do it. When I use =C2=AB-l=C2=BB and p= ass some command-line arguments to the script, Guile crashes because it int= erprets the arguments as files to load. When I use =C2=AB-l --=C2=BB, it cr= ashes because it can't find the =C2=AB--=C2=BB file. When I use =C2=AB-- -l= =C2=BB, it doesn't load the file. Even weirder to me is the fact that if I = just put =C2=AB(exit)=C2=BB in the script, Guile doesn't crash. I kinda managed to get the REPL functionality using some Bash shenanigans m= ade by someone else, but shouldn't there be an easier way? Or does it exist= , but I haven't stumbled upon it?