[PATCH femtolisp] startup script in interactive sessions
Export this patch
---
I find this useful while playing with this wonderful code! thanks!
system.lsp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/system.lsp b/system.lsp
index 056c176..b651ff6 100644
--- a/system.lsp
+++ b/system.lsp
@@ -1045,6 +1045,13 @@
(lambda (e) (begin (top-level-exception-handler e)
(exit 1)))))
+(define (__rcscript)
+ (let ((fname (case *os-name*
+ ((unknown) "")
+ ((plan9) (string (os.getenv "home") "/lib/flisprc"))
+ (else (string (os.getenv "HOME") "/.flisprc")))))
+ (if (path.exists? fname) (load fname))))
+
(define (__start argv)
(__init_globals)
(if (pair? (cdr argv))
@@ -1054,5 +1061,6 @@
(begin (set! *argv* argv)
(set! *interactive* #t)
(princ *banner*)
+ (__rcscript)
(repl)))
(exit 0))
--
2.40.0
Very nice, thanks!
(retrying replying again after SPF failure)
Very nice, thanks! Merged & bootstrapped to get it built in.