mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
17 lines
533 B
Common Lisp
17 lines
533 B
Common Lisp
(roswell:include "util-config")
|
|
|
|
(defpackage :roswell.list.env
|
|
(:use :cl)
|
|
(:export :env :env-list))
|
|
(in-package :roswell.list.env)
|
|
|
|
(defun env-list ()
|
|
(mapcar (lambda (i) (first (last (pathname-directory i))))
|
|
(directory (merge-pathnames "env/*/config" (roswell:opt "homedir")))))
|
|
|
|
(defun env (&rest r)
|
|
(declare (ignore r))
|
|
(let ((name (third (assoc "roswellenv" (roswell.util.config:load-config ".roswellenv") :test 'equal))))
|
|
(dolist (i (env-list))
|
|
(format t "~A~A~%" (if (equal name i) :* " ") i))))
|