From abd956957138d4c5339e9cb79dd590fc19808438 Mon Sep 17 00:00:00 2001 From: Antero Mejr Date: Sat, 3 Dec 2022 01:09:36 +0000 Subject: scripts: repl: Add --list-types flag. * guix/scripts/repl.scm (%options): Add --list-types. * doc/guix.texi (Invoking guix repl): Add documentation for --list-types. Signed-off-by: Maxim Cournoyer --- guix/scripts/repl.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'guix') diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm index 50d18c7760..0ec62786e9 100644 --- a/guix/scripts/repl.scm +++ b/guix/scripts/repl.scm @@ -52,6 +52,10 @@ (define %options (option '(#\t "type") #t #f (lambda (opt name arg result) (alist-cons 'type (string->symbol arg) result))) + (option '("list-types") #f #f + (lambda (opt name arg result) + (display (string-join '("guile" "machine") "\n" 'suffix)) + (exit 0))) (option '("listen") #t #f (lambda (opt name arg result) (alist-cons 'listen arg result))) @@ -70,6 +74,8 @@ (define (show-help) (display (G_ "Usage: guix repl [OPTIONS...] [-- FILE ARGS...] In the Guix execution environment, run FILE as a Guile script with command-line arguments ARGS. If no FILE is given, start a Guile REPL.\n")) + (display (G_ " + --list-types display REPL types and exit")) (display (G_ " -t, --type=TYPE start a REPL of the given TYPE")) (display (G_ " -- cgit v1.2.3