nckx pushed a commit to branch master
in repository guix.
commit 943dd59beb5b30437f940405fd2b56fea73764cb
Author: Tobias Geerinckx-Rice <[email protected]>
AuthorDate: Sat Oct 30 15:48:48 2021 +0200
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.
---
guix/ui.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/guix/ui.scm b/guix/ui.scm
index eb7f0af..4b4f21d 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -2098,8 +2098,15 @@ contain a 'define-command' form."
(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"))