GNU bug report logs -
#33466
[PATCH 0/2] Improve guix repl
Previous Next
Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>
Date: Thu, 22 Nov 2018 14:41:02 UTC
Severity: normal
Tags: patch
Done: Oleg Pykhalov <go.wigust <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* guix/scripts/repl.scm (guix-repl): Add 'colorized' and 'readline' support.
---
guix/scripts/repl.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index 1a105f51e..eeaf4acc4 100644
--- a/guix/scripts/repl.scm
+++ b/guix/scripts/repl.scm
@@ -188,6 +188,23 @@ call THUNK."
(save-module-excursion
(lambda ()
(set-current-module user-module)
+ (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")))
+ (unless (getenv "INSIDE_EMACS")
+ (cond ((false-if-exception (resolve-interface '(ice-9 colorized)))
+ =>
+ (lambda (module)
+ ;; Enable completion and input history at the REPL.
+ ((module-ref module 'activate-colorized))))
+ (else
+ (display "Consider installing the 'guile-colorized' package
+for a colorful Guile experience.\n\n"))))
;; Do not exit repl on SIGINT.
((@@ (ice-9 top-repl) call-with-sigint)
(lambda ()
--
2.19.1
This bug report was last modified 6 years and 253 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.