stdlib get-env added

This commit is contained in:
VaclavT 2021-03-15 23:23:55 +01:00
parent c4e4522492
commit 6700c04159
1 changed files with 3 additions and 0 deletions

View File

@ -37,6 +37,9 @@
(defun sleep (time)
(system-cmd (+ "sleep " (string time))))
(defun get-env (var)
(second (system-cmd (+ "echo ${" var "} | tr -d \"\n\""))))
; return second element of list
(defun second (l) (index l 1))