ui: Add top-level options to help text.

This also makes automated ‘guix --h<Tab>’ completion possible.

* guix/ui.scm (show-guix-help): Document that an OPTION's an option,
and all valid options.
This commit is contained in:
Tobias Geerinckx-Rice 2021-10-30 15:48:48 +02:00
parent c73d1e68cf
commit 943dd59beb
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -2098,8 +2098,15 @@ (define (category-predicate category)
(lambda (command)
(eq? category (command-category command))))
(format #t (G_ "Usage: guix COMMAND ARGS...
Run COMMAND with ARGS.\n"))
(format #t (G_ "Usage: guix OPTION | COMMAND ARGS...
Run COMMAND with ARGS, if given.\n"))
(display (G_ "
-h, --help display this helpful text again and exit"))
(display (G_ "
-V, --version display version and copyright information and exit"))
(newline)
(newline)
(format #t (G_ "COMMAND must be one of the sub-commands listed below:\n"))