load-to-string pulls out newline, also fix issue with nested calls
This commit is contained in:
parent
ee1ef9700d
commit
d7864ee628
3 changed files with 27 additions and 21 deletions
|
|
@ -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
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue