summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Michael <fedora.dm0@gmail.com>2014-09-21 23:21:25 -0400
committerMark H Weaver <mhw@netris.org>2014-09-21 23:21:29 -0400
commit3a3316e200ac49f0e8e9004c233747efd9f54a04 (patch)
tree4fc311b1a92ffd19451fd8cf3b78b4e56ab4700a
parent76a8db27c65b59879a8c27363f374035b233d6b7 (diff)
guile-readline: Use the current directory if HOME is unset.
* guile-readline/ice-9/readline.scm (history-file): When the HOME environment variable is unset, use the current directory instead.
-rw-r--r--guile-readline/ice-9/readline.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/guile-readline/ice-9/readline.scm b/guile-readline/ice-9/readline.scm
index cfaaef362..2142fbf14 100644
--- a/guile-readline/ice-9/readline.scm
+++ b/guile-readline/ice-9/readline.scm
@@ -118,7 +118,8 @@
(define-once the-readline-port #f)
(define-once history-variable "GUILE_HISTORY")
-(define-once history-file (string-append (getenv "HOME") "/.guile_history"))
+(define-once history-file
+ (string-append (or (getenv "HOME") ".") "/.guile_history"))
(define-public readline-port
(let ((do (lambda (r/w)