This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 |