Use (env "HOME") in pebblisp.pbl for reload.
Show current working directory in prompt.
This commit is contained in:
parent
b5f6a7d951
commit
b4e0f57029
|
@ -12,13 +12,15 @@
|
||||||
|
|
||||||
(def nl (ch 10))
|
(def nl (ch 10))
|
||||||
|
|
||||||
(def reload (fn () (loadfile "/home/sagevaillancourt/.pebblisp.pbl")))
|
(def reload (fn () (loadfile (cat (env "HOME") "/.pebblisp.pbl"))))
|
||||||
|
|
||||||
(def hour (fn (ti) (
|
(def hour (fn (ti) (
|
||||||
(def h (% ti's hour 12))
|
(def h (% ti's hour 12))
|
||||||
(if (= 0 h) 12 h)
|
(if (= 0 h) 12 h)
|
||||||
)))
|
)))
|
||||||
|
|
||||||
|
(def pwd (fn () (env "PWD")))
|
||||||
|
|
||||||
(def zero (fn (num) (cat (if (< num 10) "0" "") num)))
|
(def zero (fn (num) (cat (if (< num 10) "0" "") num)))
|
||||||
|
|
||||||
(def clock (fn (ti) (cat (hour ti) ":" (zero ti's minute) ":" (zero ti's sec))))
|
(def clock (fn (ti) (cat (hour ti) ":" (zero ti's minute) ":" (zero ti's sec))))
|
||||||
|
@ -27,6 +29,6 @@
|
||||||
(def ti (time))
|
(def ti (time))
|
||||||
|
|
||||||
(cat nl
|
(cat nl
|
||||||
bold red "[sage] " blue (clock) nl
|
bold red "[sage] " blue (clock) " " reset cyan (pwd) nl
|
||||||
green "pebblisp ~> " reset)
|
bold green "pebblisp ~> " reset)
|
||||||
)))
|
)))
|
||||||
|
|
Loading…
Reference in New Issue