makefile, gitignore and backwards compatibility with <=4.6.4 for getenv

master
Siddharth Narayanaswamy 13 years ago
parent a262cc5f41
commit 1b8a8647e1

1
.gitignore vendored

@ -0,0 +1 @@
*~

@ -0,0 +1,8 @@
# Makefile for Chicken-scheme shell
cscsh: shell.scm
csc shell.scm -o cscsh
.PHONY: clean
clean:
rm -f cscsh

@ -1,10 +1,20 @@
;;; documentation at http://thintz.com/chicken-scheme-shell
(use shell readline)
(define (getenv2 e)
;; handles exorcism of getenv from 4.6.4 onwards
(handle-exceptions
exn
(get-environment-variable e)
(getenv e)))
(current-input-port (make-gnu-readline-port))
(gnu-history-install-file-manager (string-append (or (getenv "HOME") ".") "/.csi.history"))
(gnu-history-install-file-manager
(string-append (or (getenv2 "HOME") ".") "/.csi.history"))
(repl-prompt (lambda () "$ "))
(define config-file (make-parameter (string-append (or (getenv "HOME") ".") "/.hintz-shellrc")))
(define config-file
(make-parameter (string-append (or (getenv2 "HOME") ".") "/.hintz-shellrc")))
(when (file-exists? (config-file))
(load (config-file)))

Loading…
Cancel
Save