From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IIQxIEaiimNtzwAAbAwnHQ (envelope-from ) for ; Sat, 03 Dec 2022 02:11:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SLsEIEaiimP7zgAAauVa8A (envelope-from ) for ; Sat, 03 Dec 2022 02:11:34 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2A3F838C84 for ; Sat, 3 Dec 2022 02:11:34 +0100 (CET) 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 Content-Transfer-Encoding: 8bit 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 From: Antero Mejr via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670029894; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=EFq1AHk4y2e9I6S6mQUItlF4RqcRaaKg1j195bv9GKU=; b=r28uSJOb2HXwyatmJ95tgoQ/a/n64KnwjphxVlMglKagyo23YBrGiwegKralrL9aPMKTBX htxyiigpN4i1EQ+YVK1L7oe0nD/AQ7QUFWZMfco3o1jp03kydlSBhGg1U42fYxAv4XQ4jA hciKFMMBpzk8xPMV5uKatmupchIW4ZCVvZzkzkJhK4i/+s8Cyn0UhzR1gOsrHE/Z5sArOT na0b8G3oYJ1au4nKqc+BEDETa5AUPHslxSI+5DwZ2t0hVknsZmPzhHYPC7XyX1ecGK7f2f ZBiBpTSYUvKEqeXhZhpcw6aTFiIBHGC4CqABnGC5AcXEvdP+xyiQ4b9rCA2DsA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670029894; a=rsa-sha256; cv=none; b=FR1F8LBQlRKSB8Fx0LXQ1spZ9ddUnoi35+HjIiNJ8g+WSjlhHoDzrmuI2XyFSLAbLmpOBM u+tDK7FCtvjjIpP9tcl92995ct0Z0F3Ubh8xZmZBXf/sM0FiiasHyT4abT3DSiV2soToG7 J5s3SfttSO1WH+8tenb0Kjm304alaxa+YSMTg9Fs6gyz6U6x/tRyfxFAl21z1Rf6w6oVmC 5b4C4W8cx4yHOv0a+eYaerPggRv+qbQ+prbw7hMTMoBSLhd1M7IVoyCn376XHxvcQjYMqo 57aoljcbrxXm8rUuTabS0JjNYvqFR7mrREassrkrn1sp/+jVQphgibDNQyrdrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=jRqLIcbR; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=H13eWdas; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.67 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=jRqLIcbR; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=H13eWdas; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2A3F838C84 X-Spam-Score: -2.67 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4TcVP+lJYtfR * 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_ " -- 2.38.1