From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] guix package: allow multiple arguments after -i, -r, and -u Date: Fri, 13 Dec 2013 23:35:35 +0100 Message-ID: <87txecxtu0.fsf@gnu.org> References: <87sitwfpig.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrbKj-0005sP-Mo for guix-devel@gnu.org; Fri, 13 Dec 2013 17:35:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VrbKb-0004yr-RP for guix-devel@gnu.org; Fri, 13 Dec 2013 17:35:45 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:39844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrbKb-0004ye-Bl for guix-devel@gnu.org; Fri, 13 Dec 2013 17:35:37 -0500 In-Reply-To: <87sitwfpig.fsf@netris.org> (Mark H. Weaver's message of "Fri, 13 Dec 2013 15:46:15 -0500") 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mark H Weaver Cc: guix-devel@gnu.org Mark H Weaver skribis: > From 95c205364cd0cececb0a464fea6f4a328467ef54 Mon Sep 17 00:00:00 2001 > From: Mark H Weaver > Date: Fri, 13 Dec 2013 15:37:57 -0500 > Subject: [PATCH] guix package: allow multiple arguments after -i, -r, and= -u. > > * guix/scripts/package.scm (%options): Adapt option processors to accept = and > return a second seed value: 'arg-handler', which handles bare arguments= (if > not false). The install, remove, and upgrade option processors return = an > arg-handler that repeat the same operation. All other option processors > return #f as the arg-handler. > (guix-package): Procedures passed to 'args-fold*' accept the new seed v= alue > 'arg-handler'. The 'operand-proc' uses 'arg-handler' (if not false). Looks great to me! Could you add a test in guix-package.sh, which could be just guix package -i guile gcc -n or similar? Likewise, could you add an example in guix.texi that uses this syntax, say just after =E2=80=9C@var{options} specifies...=E2=80=9D? Thanks! Ludo=E2=80=99.