bb408fdf288b8b0e6a7404dfb763769a0b2c8e8f
commit bb408fdf288b8b0e6a7404dfb763769a0b2c8e8f
Author: Simon Watson <spesk@pm.me>
Date: Fri Aug 11 19:11:31 2023 -0400

Init Commit

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ef1cd22
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+pest
diff --git a/build.lisp b/build.lisp
new file mode 100644
index 0000000..bc590ef
--- /dev/null
+++ b/build.lisp
@@ -0,0 +1,7 @@
+(load "./pest.asd")
+(asdf:load-system 'pest)
+(sb-ext:save-lisp-and-die
+ "pest"
+ :compression T
+ :toplevel 'main
+ :executable T)
diff --git a/ecl-build.lisp b/ecl-build.lisp
new file mode 100644
index 0000000..bc590ef
--- /dev/null
+++ b/ecl-build.lisp
@@ -0,0 +1,7 @@
+(load "./pest.asd")
+(asdf:load-system 'pest)
+(sb-ext:save-lisp-and-die
+ "pest"
+ :compression T
+ :toplevel 'main
+ :executable T)
diff --git a/pest.asd b/pest.asd
new file mode 100644
index 0000000..73a14e2
--- /dev/null
+++ b/pest.asd
@@ -0,0 +1,6 @@
+(asdf:defsystem pest
+ :version "0.0.1"
+ :author "Simon Watson <swatson@casanacare.com>"
+ :license "GPL"
+ :depends-on ("uiop" "cl-ppcre")
+ :components ((:file "pest")))
diff --git a/pest.lisp b/pest.lisp
new file mode 100644
index 0000000..8a0d716
--- /dev/null
+++ b/pest.lisp
@@ -0,0 +1,11 @@
+
+;; PROMPT_COMMAND='export PS1="$(pest)"'
+
+;; Regex Scanners
+(defvar *home-scan* (ppcre:create-scanner (concatenate 'string "^" (format NIL "~a" (user-homedir-pathname)))))
+
+(defun pwd ()
+ (ppcre:regex-replace *home-scan* (uiop:getenv "PWD") "~/"))
+
+(defun main ()
+ (format T "~a ~%λ " (pwd)))