[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guix package: Rename "generation" options

From: zimoun
Subject: Re: guix package: Rename "generation" options
Date: Tue, 12 Nov 2019 11:55:01 +0100


On Tue, 12 Nov 2019 at 09:59, Tanguy Le Carrour <address@hidden> 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.


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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]