From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eM2xOtwNL2GlOAEAgWs5BA (envelope-from ) for ; Wed, 01 Sep 2021 07:21:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id EDJGNtwNL2GhIgAA1q6Kng (envelope-from ) for ; Wed, 01 Sep 2021 05:21:32 +0000 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 2DE3440B1 for ; Wed, 1 Sep 2021 07:21:32 +0200 (CEST) Received: from localhost ([::1]:55654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLIgj-0002uI-Ou for larch@yhetil.org; Wed, 01 Sep 2021 01:21:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLIgL-0002tr-6m for guix-patches@gnu.org; Wed, 01 Sep 2021 01:21:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52596) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mLIgI-0005YI-TP for guix-patches@gnu.org; Wed, 01 Sep 2021 01:21:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mLIgI-0008GG-HB for guix-patches@gnu.org; Wed, 01 Sep 2021 01:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50296] [PATCH 1/2] scripts: Add 'guix home'. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Sep 2021 05:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50296 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 50296@debbugs.gnu.org Received: via spool by 50296-submit@debbugs.gnu.org id=B50296.163047363831699 (code B ref 50296); Wed, 01 Sep 2021 05:21:02 +0000 Received: (at 50296) by debbugs.gnu.org; 1 Sep 2021 05:20:38 +0000 Received: from localhost ([127.0.0.1]:35909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLIfq-0008FA-J2 for submit@debbugs.gnu.org; Wed, 01 Sep 2021 01:20:38 -0400 Received: from mail-lf1-f48.google.com ([209.85.167.48]:45717) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLIfk-0008Ep-Je for 50296@debbugs.gnu.org; Wed, 01 Sep 2021 01:20:32 -0400 Received: by mail-lf1-f48.google.com with SMTP id g13so3809072lfj.12 for <50296@debbugs.gnu.org>; Tue, 31 Aug 2021 22:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=ULjeHut6N0ipGjzDUgs93J1jmyLIPhRcKcQ5S1Iavo4=; b=CvPYlFNtY5VrKrZAXijXcN78vr0Q+8DG/feQTwA9cAf/zZ9ZiA7VUlQtWcpKiuXLjO mGe1WL+xpc+KmgwG0tqRD4a45q/CmStmOGEtet8UYvIWlV/x+kRHU6d4jjCktGtKflKX 595hFvB6Qv3aXblCdjsfWianayMAXJLBHd/dQveOx3aSp/osIAl/GQwzPBl9huq8+NQJ sSBq9Z2Ppq1JKaSr1J3+7XVaPtynDJqGFHuAeKaqdKs0PWBoCpnQ7zBmlCEf3vE+PfHl WdcCzsiwKju5Oj7Cv6vQZkUcBRryHCVfEPdkGxbkpSETh+idUDP2dXk7W6cUYkLuDcCc uiFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=ULjeHut6N0ipGjzDUgs93J1jmyLIPhRcKcQ5S1Iavo4=; b=dqL7oFOZzw5hGf/HeHPZ3gugl635iB0GeHXfTSTc8SyPcf4AzcnVXFuqDsXym2ZBYd zuXkMKe4+dwGV1Bk0/cJqslz91G/79mVR5hX4nJl89NVcb0jcP9ClWaUMhIJ1imTrqc9 vy8/X354SrZfEH4wq4PL/LYrdX7eMb6gd6exyWKDtpv7raas+NM56XGWAKophu8081DG gopiKuapEXGHM+OJlzf7LwKpyYIQ+5gqpJKSd0k+jZqh66XqkfyDCZOOFxZHRoY8eNY4 CfsECScrIregf8H7CQwP5anmeURWydKGJla6sFfe3gLAres5x4INkv98hBnNJT+p/aMJ +NfA== X-Gm-Message-State: AOAM532PbPMDQbZwSNc37FLQeZH5lnixapAqmMxLuHP6mWYECEIkE8ku ovNgKTfvE4Jfph4wDWOwMjOlbw== X-Google-Smtp-Source: ABdhPJyJcGJpnKQ4PBxCRDo9xGIj8lCd/imZrApWLuR4ewDD4JnkyvzRJVGrNQpzrmGXpPut75zBDQ== X-Received: by 2002:a05:6512:3311:: with SMTP id k17mr24612005lfe.520.1630473622396; Tue, 31 Aug 2021 22:20:22 -0700 (PDT) Received: from localhost ([109.252.93.92]) by smtp.gmail.com with ESMTPSA id h28sm1592076lfv.194.2021.08.31.22.20.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Aug 2021 22:20:21 -0700 (PDT) From: Andrew Tropin In-Reply-To: References: <874kb6j718.fsf@trop.in> <87y28ihs07.fsf@trop.in> <86pmttopfk.fsf@gmail.com> <87ilzlizit.fsf@trop.in> Date: Wed, 01 Sep 2021 08:20:17 +0300 Message-ID: <87lf4gzxbi.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630473692; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=ULjeHut6N0ipGjzDUgs93J1jmyLIPhRcKcQ5S1Iavo4=; b=c+Zrx6siuSrkYO/OY0Pc+Wytadh8ABD3Iw/MLhgwKskQ61cH9/AG+ubKM5GvsQqTt1eO2p KHoDmPAD2m1EEwl+xqb1hOgZ+aAPGN/kzh37qeGY1iREjVg7goiZJ/MHddxpT6GtXtzpnu W0tnCZ1hhvR7wcu7k7Ry1P3hGYMH+AGMyOnvIZWeIDq/KcaSWRhEDKvSUbLbabAHW0L7jh uN0YxvT7cj9X9kmuqOirozeeA7tFcDqirIj3Yk7W5Gbpyhr0qQZEA9E8+KCaQBFLVDUqMo DiBM6q4ePKS9/2gnTpGiJWaVa+jXV8zkfdYWwMLrsh7t9H2ZENPW4RmT7jqfeg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630473692; a=rsa-sha256; cv=none; b=YEKF221NltCoJNbH85KEW/xKAMVjicp3dGvTlLsObf5CgszIljkLDaeaEhosnTUQhSFX/O SleXR3LeAnPS0YTVKF98cyKylaF8RtsdVNdPwFtHOx+pa3rvPSz3jS3PJ4jshZllCLmhjK pPM/addLP2e9NaYmvJATfj1g9yswYX/zovZKL3OszfKpHPX8qekpb4q38xEnMvQnMKMiuG kTbU+AHJCPLmjw7sOCg1iv3BVuQv111PHAR0kI0iPCMXLZ/CaXMHoVr0sdCBb+NQbjzpn/ sEnLsXHtWwQdZCwK3+9kREtin3RVwB5fm4jn5gqKvdFC6SLplgh7xgtEmtfbLA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20150623.gappssmtp.com header.s=20150623 header.b=CvPYlFNt; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.52 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20150623.gappssmtp.com header.s=20150623 header.b=CvPYlFNt; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 2DE3440B1 X-Spam-Score: -3.52 X-Migadu-Scanner: scn0.migadu.com X-TUID: RjYLVF4AWoe9 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-08-31 15:09, zimoun wrote: > Hi, > > On Tue, 31 Aug 2021 at 14:12, Andrew Tropin wrote: >> On 2021-08-31 12:53, zimoun wrote: >> > On Tue, 31 Aug 2021 at 12:40, Andrew Tropin wrote: >> > >> >> +(define-command (guix-home . args) >> >> + (synopsis "build and deploy home environments") >> >> + >> >> + (define (parse-sub-command arg result) >> >> + ;; Parse sub-command ARG and augment RESULT accordingly. >> >> + (if (assoc-ref result 'action) >> >> + (alist-cons 'argument arg result) >> >> + (let ((action (string->symbol arg))) >> >> + (case action >> >> + ((build >> >> + reconfigure >> >> + extension-graph shepherd-graph >> >> + list-generations describe >> >> + delete-generations roll-back >> >> + switch-generation search >> >> + import) >> >> + (alist-cons 'action action result)) >> >> + (else (leave (G_ "~a: unknown action~%") action)))))) >> > >> > For parsing the actions, I would define elsewhere the list. Then if t= he >> > action is unknown, you could use =E2=80=99string-closest=E2=80=99 and = so return an hint >> > if there is a typo. > > [...] > >> Sounds good, the same "issue" exists for guix system subcommands, it >> would be cool to have such functionality, but I would like to have those >> changes to both guix system and guix home after wip-guix-home merged, >> because backporting changes to rde is a little tedious. > > Your point is to hint both "guix system" and "guix home" in the same > time because they share the same pattern. Right? > >> Also, it seems related to subcommands/--arguments discussion and maybe >> better to talk about it in a separate thread. > > Yes, and from my understanding, your answer is keep consistency with > "guix system". :-) > > Cheers, > simon Yep, corret (: --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmEvDZEACgkQIgjSCVjB 3rCBuhAAkFjmNkkx8CCD0n4ez7mhICxLwET6gZqHkCG5GYYIKNjk9wflPHFpvwD6 E4xBLhi13lhQvSVD38ZbYnFPWIvmG5ykZB9jHPjFATqU17TSI4FF/Sn1sXz5084n rD3qpAZJ1q6gSJMLCX/YJzzqUYqhaV/zGgX53qiN1hX4t0BBPxKuS9rGtS1CkIsT 100HROpQUJvT+XHyYhbOEYqYBVIYUI7G2nWwu/yyTNJWzBdAXbbybe27cUCdI/n/ 8aV75MtVr1XzA8hLieyvarpbU2PyqTmPYmTrVA4oFX8FitkQG5l3VMlPkTfsCm0l mqnVaXg2WKHPJVpBXjkuSnHPdcPhA02p09b98bSsPDXNqSDUzLSBIX9LGPZJpzWL 77GQ5i7J4gxakON7bW3yesygFO/fas2CG+kWYr2smV4l5SSFmdQzAjat8zh2dtTs /MSmJqIi0Zi251Eaek4lhLaRLbztQmJxmGvGngjsAW7qsORLNVjDImQx7coavD0U qXZAQ8+9w3kQuL4JlU9e0MOIwAziL0fKBu7ZIjTKbqPywwXCKmTOijekUXbVih0T Xikvt1ArSVyMpOCer5qoFfbj84UWTxsr9957YrAplZlj9p2JvtDcgl5IBCeW9r0h Pes5a+pAKRh9MhseD1XkZdi6ngeVE3nAPZ1f9CrCiJVy8Kz8seA= =s3J9 -----END PGP SIGNATURE----- --=-=-=--