all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Tanguy Le Carrour <tanguy@bioneland.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: guix package: Rename "generation" options
Date: Tue, 12 Nov 2019 11:55:01 +0100	[thread overview]
Message-ID: <CAJ3okZ3vf2sWP6p3FsXjACRZeYGZm2xSGKeTdnneC3mc5K_fYw@mail.gmail.com> (raw)
In-Reply-To: <20191112085843.h5gzy34ompkf7mto@rafflesia>

Dear,

On Tue, 12 Nov 2019 at 09:59, Tanguy Le Carrour <tanguy@bioneland.org> wrote:

> Le 11/08, Hartmut Goebel a écrit :
> > i often stumble about generation related short-options being mixed lower
> > and upper-case:
> >
> >   -l, --list-generations[=PATTERN]
> >   -d, --delete-generations[=PATTERN]
> >   -S, --switch-generation=PATTERN
> >
> > 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[=PATTERN]
> $ guix package --delete-generations[=PATTERN]
> $ guix package --switch-generation=PATTERN
> ```
>
> *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 options.
> 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

  reply	other threads:[~2019-11-12 10:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 12:47 guix package: Rename "generation" options Hartmut Goebel
2019-11-12  8:58 ` Tanguy Le Carrour
2019-11-12 10:55   ` zimoun [this message]
2019-11-17 10:59   ` Ludovic Courtès
2019-11-18 13:58     ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ3okZ3vf2sWP6p3FsXjACRZeYGZm2xSGKeTdnneC3mc5K_fYw@mail.gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=tanguy@bioneland.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.