Simon Watson 1 gadu atpakaļ
vecāks
revīzija
bb408fdf28
5 mainītis faili ar 32 papildinājumiem un 0 dzēšanām
  1. 1 0
      .gitignore
  2. 7 0
      build.lisp
  3. 7 0
      ecl-build.lisp
  4. 6 0
      pest.asd
  5. 11 0
      pest.lisp

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+pest

+ 7 - 0
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)

+ 7 - 0
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)

+ 6 - 0
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")))

+ 11 - 0
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)))