~ft/public-inbox

femtolisp: startup script in interactive sessions v1 APPLIED

mag: 1
 startup script in interactive sessions

 1 files changed, 8 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~ft/public-inbox/patches/40173/mbox | git am -3
Learn more about email & git

[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.