From f1bf6d3dbd913002f51c97c91c34a292ba0ecb5e Mon Sep 17 00:00:00 2001 From: zimoun Date: Mon, 29 Mar 2021 12:18:04 +0200 Subject: scripts: repl: Replace 'args-fold*' by 'parse-command-line'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/scripts/repl.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès --- guix/scripts/repl.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'guix/scripts/repl.scm') diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm index 9f20803efc..50d18c7760 100644 --- a/guix/scripts/repl.scm +++ b/guix/scripts/repl.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018, 2019, 2020 Ludovic Courtès -;;; Copyright © 2020 Simon Tournier +;;; Copyright © 2020, 2021 Simon Tournier ;;; Copyright © 2020 Konrad Hinsen ;;; ;;; This file is part of GNU Guix. @@ -143,14 +143,13 @@ (define-command (guix-repl . args) (synopsis "read-eval-print loop (REPL) for interactive programming") (define opts - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) + (parse-command-line args %options (list %default-options) + #:build-options? #f + #:argument-handler (lambda (arg result) (append `((script . ,arg) (ignore-dot-guile? . #t)) - result)) - %default-options)) + result)))) (define user-config (and=> (getenv "HOME") -- cgit v1.2.3