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 WDUrBnSlwmKAOQEAbAwnHQ (envelope-from ) for ; Mon, 04 Jul 2022 10:31:48 +0200 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 aMDHBXSlwmL/rwAAauVa8A (envelope-from ) for ; Mon, 04 Jul 2022 10:31:48 +0200 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 8DD05392D2 for ; Mon, 4 Jul 2022 10:31:47 +0200 (CEST) Received: from localhost ([::1]:37260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8HUg-0000Tf-R7 for larch@yhetil.org; Mon, 04 Jul 2022 04:31:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8HTr-0000QU-TZ for guix-devel@gnu.org; Mon, 04 Jul 2022 04:30:55 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:42650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8HTn-00042D-Is for guix-devel@gnu.org; Mon, 04 Jul 2022 04:30:55 -0400 Received: by mail-wr1-x433.google.com with SMTP id s1so12328969wra.9 for ; Mon, 04 Jul 2022 01:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=qcVlBeadGRjxcuStdnDBd7AjUHCSyJ8Kn4Y/kEgWJMI=; b=fH48IDs+QUn9LShCpyEZ8BuHFONBtj2vi+rz4np2keSGLvJDYfxsWuMMZ3nY/CJlcU +NS0/0Gfsi6oXBdeCk28qULsjBt+2YmBjPKdX5dmUvYe8S6TdoiMrmxYfxPVXcF/f6BH 4a1aGbkravr/+aKI7FD6FYAxayGHwu1Z+gDUNqiFuX1KC3ild3gbmzavy9U1sXcGzAwq N/P/FzayU7w4kxZtVG0+c2mlAvvqB6sdaWlDGw0+Uo37CVKKF64Ropr0mt/D6rA9tpmq bZ7cpEC+c04HMh1Tfvyg4DZwRwga3Z31a5fBGBKJOENEu1taIkNth0uSmatJxqqLgv6F jBiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=qcVlBeadGRjxcuStdnDBd7AjUHCSyJ8Kn4Y/kEgWJMI=; b=e1SBZ4wxZC+XQL4i4nBvF11rua3YYfmWCyT2exg1sJ/JUnVhZvGhbDD4WreEqzj8Wh poYArYfL1oaxroVWgxD7HyA1iHtf2pm7ASxjRKk6Xj6MzcvNWA7E+7fn1BFtmxLbxyLE kkUlTFcXXYfdkaN6rJ1JLuaezPdHzEdAL75k/b4K5qHCBE/kuONjB2p/9/fc9jrCrzGr 4FrHIQS8MyQor6OiluhStXOBWS8WdGRjFt31LcaT48Pt5uw56mJ09FxYt49vu7upw7mi ADMIhX5xHu6eHmPvhHKhOL8vumXhObO+2SAZGQrt+RdqJTHeBIZ/f0TmDDWp3Oas2l1t gezQ== X-Gm-Message-State: AJIora9lMoa7EKTMqBjiuAt23ILuu0im5sdr2dZMuexbX+l+dSaj6HYJ Qp8GgoVXfufdwFRDkPBRBEO/CVfGB5jOLg== X-Google-Smtp-Source: AGRyM1vWpmGLsn0Cd/QJh04zAVojFcu0LdfuC+/4Gcty1+l1XfHnd0YJdrPp1jEEVgUk+FXyCZOsSw== X-Received: by 2002:a5d:5c11:0:b0:21b:a9a2:7eec with SMTP id cc17-20020a5d5c11000000b0021ba9a27eecmr25805179wrb.579.1656923449720; Mon, 04 Jul 2022 01:30:49 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id l4-20020a1c7904000000b003a047f64496sm18746271wme.7.2022.07.04.01.30.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 01:30:49 -0700 (PDT) From: zimoun To: jgart , Guix Devel Subject: Re: repl macro (metacommand?) for guix CLI (sub)commands In-Reply-To: <20220703131112.GB5967@gac> References: <20220703131112.GB5967@gac> Date: Mon, 04 Jul 2022 10:29:20 +0200 Message-ID: <86edz11dsv.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x433.google.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656923507; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=qcVlBeadGRjxcuStdnDBd7AjUHCSyJ8Kn4Y/kEgWJMI=; b=EPoZhMue4mX3zBq072ZPbPcrReNbYyvbBYcbTBgAOfde+DusH3zBb2Ef0guC7B7Gdlh9ql 951Yu4sELNxcA5tSitPtFjh36h6v+kqBxodJIIWnCPr2nyfel1hRCAFjuG/CUh+Asq8bSy T6GflIgriXJRIhRMfGpBFE0ngMl/zwYvLWV85hresr8r9vpRNyRNjadbdyVUn1tJFBnrQm rokkOihIuw0GCsi/4S8bcoCMooW0HdMEJmbP2OAHDWkr4WeYy9ygPZL2FOYx5OBL3T9Rlz QoDCmXzslY9rPXvzSn7UTr3cSn976ZYtrTQKmR8z7RDpa3Q5M3aXdDES4520Iw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656923507; a=rsa-sha256; cv=none; b=RBDdWvejG4DMSZgYk/a6ILoCDDbOchjlptwtOXf2qKYq1p5Ch0LZgqy6hbn60p3No3y3UC cC8eaVTMK20A6BZv533mmty8h0FYV03ZKkJeu1oQrbWJCMYateo9l9xH6wA7Xcj6tB6Xt4 xKXyTfKqRz9n1Tf3jGM0TgrN4ZvIMhWjTrWSracAusu3LwlfWFqDBRZLtdiMzCG0BdA4Jk oaL11MjTU8YvApkKkMvkqOMZuEIbkgSRiJes0RH5ohvXTzvZQI/jlaegBXaitPE1LXHn17 9aWFKHoG61MpCtBe1hsH7wpACgi0ftsfN+weY2f8aSU0G6QlhYDHMSTRxvdv1A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=fH48IDs+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.94 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=fH48IDs+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8DD05392D2 X-Spam-Score: -3.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: hHIja0r2imX/ Hi, On Sun, 03 Jul 2022 at 13:11, jgart wrote: > What do guixers think of having a repl macro that allows > you to run commands like if you were using the CLI? I am not sure to understand the question. Well, it is already possible, no? --8<---------------cut here---------------start------------->8--- $ guix repl GNU Guile 3.0.8 Copyright (C) 1995-2021 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guix-user)> ,use(guix scripts show) scheme@(guix-user)> (guix-show "hello") name: hello version: 2.12.1 outputs: out systems: x86_64-linux i686-linux dependencies: location: gnu/packages/base.scm:86:2 homepage: https://www.gnu.org/software/hello/ license: GPL 3+ synopsis: Hello, GNU world: An example GNU package description: GNU Hello prints the message "Hello, world!" and then exits. It serves as an example of standard GNU + coding practices. As such, it supports command-line arguments, multiple languages, and so on. $1 = #t scheme@(guix-user)> ,use(guix scripts package) scheme@(guix-user)> (guix-package "-s" "hello") [...] --8<---------------cut here---------------end--------------->8--- Obviously, using CLI at the REPL is always not handy, --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> (guix-show "helloo") guix repl: error: helloo: package not found $ --8<---------------cut here---------------end--------------->8--- Cheers, simon