From 943dd59beb5b30437f940405fd2b56fea73764cb Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 30 Oct 2021 15:48:48 +0200 Subject: ui: Add top-level options to help text. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This also makes automated ‘guix --h’ 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(-) (limited to 'guix/ui.scm') diff --git a/guix/ui.scm b/guix/ui.scm index eb7f0afcfd..4b4f21d32c 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")) -- cgit v1.2.3