From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: guix package: Rename "generation" options Date: Tue, 12 Nov 2019 11:55:01 +0100 Message-ID: References: <80a7f0b8-9fb0-239d-bc61-d99209e95cb3@crazy-compilers.com> <20191112085843.h5gzy34ompkf7mto@rafflesia> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59580) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUTpL-0005rI-5B for guix-devel@gnu.org; Tue, 12 Nov 2019 05:55:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUTpJ-0004Jh-PK for guix-devel@gnu.org; Tue, 12 Nov 2019 05:55:14 -0500 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]:34523) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iUTpJ-0004JJ-JR for guix-devel@gnu.org; Tue, 12 Nov 2019 05:55:13 -0500 Received: by mail-qt1-x82e.google.com with SMTP id i17so7701049qtq.1 for ; Tue, 12 Nov 2019 02:55:13 -0800 (PST) In-Reply-To: <20191112085843.h5gzy34ompkf7mto@rafflesia> 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" To: Tanguy Le Carrour Cc: guix-devel Dear, On Tue, 12 Nov 2019 at 09:59, Tanguy Le Carrour wrot= e: > Le 11/08, Hartmut Goebel a =C3=A9crit : > > i often stumble about generation related short-options being mixed lowe= r > > and upper-case: > > > > -l, --list-generations[=3DPATTERN] > > -d, --delete-generations[=3DPATTERN] > > -S, --switch-generation=3DPATTERN > > > > I would prefer to have them consistent, so they are easier to remember. I am not sure it will help. As any short shortcut, the memory needs to be muscled. :-) > Speaking of consistency, I've been wondering for months why `guix system` > and `guix package` do not work the same way!? One uses positional > arguments, the other options! > > ``` > $ guix package --list-generations[=3DPATTERN] > $ guix package --delete-generations[=3DPATTERN] > $ guix package --switch-generation=3DPATTERN > ``` > > *vs* > > ``` > $ guix system list-generations [PATTERN] > $ guix system delete-generations [PATTERN] > $ guix system switch-generation PATTERN > ``` > > Is this on purpose?! > I think `guix system` is better, as those are actions, not modifiers or o= ptions. > Does this make sense?! As Konrad mentioned here [1], "guix package" should be split. Even I agree that "actions" like "guix system" seems better, I always type "guix package -l" and almost never "guix package --list-generations" and I would not like to be forced to type "guix package list-generations" instead. [1] https://lists.gnu.org/archive/html/guix-devel/2019-11/msg00130.html However, "--install" and "--remove" are actions too. And if they are transformed into positional arguments, then you cannot install and remove in the same transactions, e.g., "guix package -i foo -r bar". And talking about consistency and options vs positional, with option style you can ask non-sense. Compare: guix package -I -A guix package -A -I It is expected because the pattern matching. But the fact that some options exclude other ones is not currently taken in count; if I understand well. And "option exclusion" will add a lot of complexity for few improvements, IMHO. Naming is hard and UI is harder. :-) All the best, simon