Message ID | 20230303162135.2864-1-jgart@dismail.de |
---|---|
State | New |
Headers | show |
Series | [bug#60564] scripts: refresh: Add -T option. | expand |
Hi jgart, jgart <jgart@dismail.de> writes: > * doc/guix.texi (Invoking guix refresh): Document the -T option. > * guix/scripts/refresh.scm (%options): Add the -T flag. > --- > > Hi Josselin and Maxim > >> I wonder if this option is common enough to need a dedicated short >> switch? > > I would probably use the option more if it had a short option ;() > > I think that it is useful. What would be the negative of adding the short option for it? Nothing immediately, but we'd have to honor T forever as it'd be part of the public CLI, loosing that letter for something more useful that may yet to appear. Probably an overblown concern, to be honest, eh. I'll see what Josselin says about it, otherwise I'll push it soon.
Hi jgart and Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > Nothing immediately, but we'd have to honor T forever as it'd be part of > the public CLI, loosing that letter for something more useful that may > yet to appear. > > Probably an overblown concern, to be honest, eh. > > I'll see what Josselin says about it, otherwise I'll push it soon. I'm on the fence as well, it doesn't seem like something you would use very often, compared to eg. `-l` or `-u`, especially if you mention that you would use the option more often if this was implemented (I'd expect more of a "I use it all the time but typing it is annoying"). `guix size` and `guix graph` are the more useful commands imho. What do you use it for specifically (maybe that would help us understand the use-case a bit more)? At the same time, it's probably fine, we don't have many options for `guix refresh` and it's not like dozens of them will get added overnight (and they maybe don't deserve a short argument either). I'll leave it in your hands 🤠. Best,
diff --git a/doc/guix.texi b/doc/guix.texi index 6ff525d0ff..25bbd75f04 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -14327,6 +14327,7 @@ for compatibility with an upgraded @code{flex} package. @table @code @item --list-transitive +@item -T List all the packages which one or more packages depend upon. @example diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index 6498d73c2b..6b633840e0 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -101,7 +101,7 @@ (define %options (option '(#\r "recursive") #f #f (lambda (opt name arg result) (alist-cons 'recursive? #t result))) - (option '("list-transitive") #f #f + (option '(#\T "list-transitive") #f #f (lambda (opt name arg result) (alist-cons 'list-transitive? #t result))) @@ -159,7 +159,7 @@ (define (show-help) (display (G_ " -r, --recursive check the PACKAGE and its inputs for upgrades")) (display (G_ " - --list-transitive list all the packages that PACKAGE depends on")) + -T, --list-transitive list all the packages that PACKAGE depends on")) (newline) (display (G_ " --keyring=FILE use FILE as the keyring of upstream OpenPGP keys"))