[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guix package: Rename "generation" options
From: |
Ludovic Courtès |
Subject: |
Re: guix package: Rename "generation" options |
Date: |
Sun, 17 Nov 2019 11:59:23 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hello!
Tanguy Le Carrour <address@hidden> skribis:
> 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 think changing that would be extremely hard if you take all the
constraints into account, including consistency: ‘-L’ has to be
‘--load-path’ for consistency with all the software out there that uses
‘-L’ with this meaning. Plus, I don’t think lower-case vs. upper-case
matters that much.
> 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?!
Well, yes and no. :-)
‘guix system’ arrived several years after ‘guix package’ and it was
designed from the start to have ‘guix system ACTION’, because it made a
lot of sense in that context. Conversely, ‘guix package’ was never
meant to have sub-actions, and I agree with zimoun that it would be
inconvenient if we had to type (say) ‘guix package install foo’.
That said, I agree that the inconsistency is troubling. Would it be
better to have ‘guix list-generations’, etc.? Or maybe that ‘guix
profile’ command that has been proposed before?
Food for thought!
Ludo’.