- Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathuser.lisp
15 lines (12 loc) · 546 Bytes
/
user.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(in-package:lispkit)
(defunget-xdg-config-dir ()
(let ((dir (uiop:getenv "XDG_CONFIG_HOME")))
(if (or (not dir) (string= dir ""))
(merge-pathnames#p".config/" (user-homedir-pathname))
dir)))
(defunget-rc-file ()
(let* ((xdg-config-dir (get-xdg-config-dir))
(user-rc (probe-file (merge-pathnames (user-homedir-pathname) #p".lispkitrc")))
(conf-rc (probe-file (merge-pathnames#P"lispkit/config" xdg-config-dir)))
(etc-rc (probe-file#p"/etc/lispkit")))
(or user-rc conf-rc etc-rc)))