load-to-string pulls out newline, also fix issue with nested calls

This commit is contained in:
Ava Apples Affine 2023-04-19 18:24:15 -07:00
parent ee1ef9700d
commit d7864ee628
Signed by: affine
GPG key ID: 3A4645B8CF806069
3 changed files with 27 additions and 21 deletions

View file

@ -53,15 +53,6 @@
(set (q bat-iter) (pop rem))))
display)))
(def getcwd 'gets pwd basename'
(lambda ()
(let ((cwd (load-to-string pwd))
(dir-raw (load-to-string basename cwd))
;; pull out newlines
(dir (dq (cdr (dq (cdr (dq (split dir-raw ""))))))))
(reduce (lambda (x y) (concat x y))
(cdr dir)))))
(def CFG_RELISH_R_PROMPT 'display battery info'
()
(display-batteries))
@ -70,6 +61,6 @@
()
(concat
"[" USER "] "
(getcwd) " "
(load-to-string basename (load-to-string pwd)) " "
;; add more prompt elements here
))