Added the ability to accept an S-expression as an argument.
authorSaba Saba <saba@sabadev.xyz>
Thu, 9 Feb 2023 17:26:22 +0000 (12:26 -0500)
committerSaba Saba <saba@sabadev.xyz>
Thu, 9 Feb 2023 17:26:22 +0000 (12:26 -0500)
git-repl.cl

index 759c31f..8a4bf03 100644 (file)
       (force-output))))
 
 (defun main ()
-  (progn
-    (help)
-    (repl)))
+  (let ((args (cdr *posix-argv*)))
+    (if args
+        (print (eval (read-from-string (str:join " " args))))
+        (progn
+          (help)
+          (repl)))))
 
 (defun-public make (&key (executable-name *installation-file*) (source-file "git-repl.cl"))
   "Compiles the current state into an executable"