Skip to content

Instantly share code, notes, and snippets.

@ryukinix
ryukinix / find-executable.lisp
Last active August 19, 2025 05:46
find-executable in Common Lisp
(defun executables ()
(loop with path = (uiop:getenv "PATH")
for p in (uiop:split-string path :separator ":")
for dir = (probe-file p)
when (uiop:directory-exists-p dir)
append (uiop:directory-files dir)))
(defun find-executable (name)
(find name (executables)
:test #'equalp