Merge pull request #1 from iffsid/master

Minor packaging and version compatibility fix
master
Thomas Hintz 13 years ago
commit 8b05590440

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) (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)) (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 () "$ ")) (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)) (when (file-exists? (config-file))
(load (config-file))) (load (config-file)))
@ -27,4 +37,4 @@
(newline) (newline)
(shell-repl))))) (shell-repl)))))
(shell-repl) (shell-repl)

Loading…
Cancel
Save