From patchwork Sat Dec 3 01:09:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antero Mejr X-Patchwork-Id: 45020 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8584D27BBEB; Sat, 3 Dec 2022 01:11:35 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CC00427BBE9 for ; Sat, 3 Dec 2022 01:11:33 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1H3Y-00085i-I4; Fri, 02 Dec 2022 20:11:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1H3W-00085O-C3 for guix-patches@gnu.org; Fri, 02 Dec 2022 20:11:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1H3W-0007LF-3T for guix-patches@gnu.org; Fri, 02 Dec 2022 20:11:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p1H3V-0008M3-UZ for guix-patches@gnu.org; Fri, 02 Dec 2022 20:11:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59754] [PATCH 1/2] scripts: repl: Add --list-types flag. References: <20221202025641.9318-1-antero@mailbox.org> In-Reply-To: <20221202025641.9318-1-antero@mailbox.org> Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 Dec 2022 01:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59754 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59754@debbugs.gnu.org Cc: Antero Mejr Received: via spool by 59754-submit@debbugs.gnu.org id=B59754.167002981232089 (code B ref 59754); Sat, 03 Dec 2022 01:11:01 +0000 Received: (at 59754) by debbugs.gnu.org; 3 Dec 2022 01:10:12 +0000 Received: from localhost ([127.0.0.1]:49988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1H2h-0008LV-L9 for submit@debbugs.gnu.org; Fri, 02 Dec 2022 20:10:12 -0500 Received: from mout-p-102.mailbox.org ([80.241.56.152]:46124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1H2d-0008Kx-NR for 59754@debbugs.gnu.org; Fri, 02 Dec 2022 20:10:09 -0500 Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4NPBYb4k6Rz9sRG for <59754@debbugs.gnu.org>; Sat, 3 Dec 2022 02:09:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1670029795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=EFq1AHk4y2e9I6S6mQUItlF4RqcRaaKg1j195bv9GKU=; b=jRqLIcbR+OuSpjv3juB8fD5t02CVyIIpFQS7QRjDuDDX++vfwDhY2zmys+E78b2ez0VAVg C4sOmdi37s1rWVmnNOce+ygWKlCMbKqVHOs3QTfum4GF17rzUzfg13UzoFDfs2VOASheou cEd7VJhG/fpxUEwKpGx8uZzlCycX2gWTqWQI1Hq7zn5Pyb99cOcRMtozRpTTw+ekuC8r4w OJSvZSTmQRUwF1UnwfV6M4J1xH+wgZIBsUlHX0x6NVOGwxA2j0ka/m4LSvRQjixBq58neV uA5HjwNleVuptitqBM7nQUEo/tBucayvtrEq4Dmqhnb7+MhD08ZsCNDFg4mAMg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1670029791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=EFq1AHk4y2e9I6S6mQUItlF4RqcRaaKg1j195bv9GKU=; b=H13eWdas3u4Faybl67wPxpnEi1xHUyX0wlQk2ZpkJuEVwo20GRMHBvFbwTNEPZptILaGt0 vZiAtcZVzK/TjxGVedRKrOFbOKdy8i8wC8AGMcvPugp90qkl8/pZvqX4FoXM1XAz3g+1SP gp8kc9mlGenOAN7fepgh1kCbEU3sgKb2GQ/CrMPCtMF3Fk2vhC3udTEK6soeyT8PyMUwMA 5Af1J0ZqDbm0Eu9XVObU8rBYV+lGnklVVAO4Th9KkbxhV4TJbBMEhyDhWN/brfvQSr347a Vwu5FW+8h7p4Lb2GRHxkUWMXDSQPF3Vy+wc9Cn4GFpRWyIuAhIx6adxcWl3DCA== Date: Sat, 3 Dec 2022 01:09:36 +0000 Message-Id: <20221203010937.2332-1-antero@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: ad8a5fd20fab7c8a285 X-MBO-RS-META: qzeaiob6rwz6j1n4gn7p1qf8odyhxwj7 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Antero Mejr X-ACL-Warn: , Antero Mejr via Guix-patches X-Patchwork-Original-From: Antero Mejr via Guix-patches via From: Antero Mejr Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/scripts/repl.scm (%options): Add --list-types. * doc/guix.texi (Invoking guix repl): Add documentation for --list-types. --- doc/guix.texi | 4 ++++ guix/scripts/repl.scm | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 47b805dc7f..cf9e6f640d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12011,6 +12011,10 @@ of Guix. The available options are as follows: @table @code +@item --list-types +Display the @var{TYPE} options for @command{guix repl --type=TYPE} and +exit. + @item --type=@var{type} @itemx -t @var{type} Start a REPL of the given @var{TYPE}, which can be one of the following: diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm index 50d18c7760..0ec62786e9 100644 --- a/guix/scripts/repl.scm +++ b/guix/scripts/repl.scm @@ -52,6 +52,10 @@ (define %options (option '(#\t "type") #t #f (lambda (opt name arg result) (alist-cons 'type (string->symbol arg) result))) + (option '("list-types") #f #f + (lambda (opt name arg result) + (display (string-join '("guile" "machine") "\n" 'suffix)) + (exit 0))) (option '("listen") #t #f (lambda (opt name arg result) (alist-cons 'listen arg result))) @@ -70,6 +74,8 @@ (define (show-help) (display (G_ "Usage: guix repl [OPTIONS...] [-- FILE ARGS...] In the Guix execution environment, run FILE as a Guile script with command-line arguments ARGS. If no FILE is given, start a Guile REPL.\n")) + (display (G_ " + --list-types display REPL types and exit")) (display (G_ " -t, --type=TYPE start a REPL of the given TYPE")) (display (G_ "