aboutsummaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/shadow.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 2b8412cdd5..119f7e4d0b 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -197,10 +197,14 @@ set auto-load safe-path /gnu/store/*/lib\n")))
(".zlogin" ,zlogin)
(".Xdefaults" ,xdefaults)
(".guile" ,(plain-file "dot-guile"
- (string-append
- "(use-modules (ice-9 readline))\n\n"
- ";; Enable completion at the REPL.\n"
- "(activate-readline)\n")))
+ "(cond ((false-if-exception (resolve-interface '(ice-9 readline)))
+ =>
+ (lambda (module)
+ ;; Enable completion and input history at the REPL.
+ ((module-ref module 'activate-readline))))
+ (else
+ (display \"Consider installing the 'guile-readline' package for
+convenient interactive line editing and input history.\\n\\n\")))\n"))
(".guile-wm" ,guile-wm)
(".gdbinit" ,gdbinit))))