summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorzimoun <zimon.toutoune@gmail.com>2021-03-29 12:18:04 +0200
committerLudovic Courtès <ludo@gnu.org>2021-04-01 14:58:54 +0200
commitf1bf6d3dbd913002f51c97c91c34a292ba0ecb5e (patch)
tree9aba4665ad4f941ab9eaa670a9af700fb4082a61 /guix
parentec3090e0c21cc18a697c8c150fbe0096d83ec4ca (diff)
downloadguix-patches-f1bf6d3dbd913002f51c97c91c34a292ba0ecb5e.tar
guix-patches-f1bf6d3dbd913002f51c97c91c34a292ba0ecb5e.tar.gz
scripts: repl: Replace 'args-fold*' by 'parse-command-line'.
* guix/scripts/repl.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/repl.scm11
1 files changed, 5 insertions, 6 deletions
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 <ludo@gnu.org>
-;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2020, 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
;;;
;;; This file is part of GNU Guix.
@@ -143,14 +143,13 @@ call THUNK."
(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")