aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/repl.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/repl.scm')
-rw-r--r--guix/scripts/repl.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index b157833a49..02169e8004 100644
--- a/guix/scripts/repl.scm
+++ b/guix/scripts/repl.scm
@@ -188,7 +188,15 @@ call THUNK."
(save-module-excursion
(lambda ()
(set-current-module user-module)
- (start-repl))))
+ (and=> (getenv "HOME")
+ (lambda (home)
+ (let ((guile (string-append home "/.guile")))
+ (when (file-exists? guile)
+ (load guile)))))
+ ;; Do not exit repl on SIGINT.
+ ((@@ (ice-9 top-repl) call-with-sigint)
+ (lambda ()
+ (start-repl))))))
((machine)
(machine-repl))
(else