Archived
1
0
Fork 0

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>
This commit is contained in:
zimoun 2021-03-29 12:18:04 +02:00 committed by Ludovic Courtès
parent ec3090e0c2
commit f1bf6d3dbd
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; 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> ;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
@ -143,14 +143,13 @@ call THUNK."
(synopsis "read-eval-print loop (REPL) for interactive programming") (synopsis "read-eval-print loop (REPL) for interactive programming")
(define opts (define opts
(args-fold* args %options (parse-command-line args %options (list %default-options)
(lambda (opt name arg result) #:build-options? #f
(leave (G_ "~A: unrecognized option~%") name)) #:argument-handler
(lambda (arg result) (lambda (arg result)
(append `((script . ,arg) (append `((script . ,arg)
(ignore-dot-guile? . #t)) (ignore-dot-guile? . #t))
result)) result))))
%default-options))
(define user-config (define user-config
(and=> (getenv "HOME") (and=> (getenv "HOME")