Skip to content

Instantly share code, notes, and snippets.

@t-sin
Last active August 29, 2015 14:15
Show Gist options
  • Save t-sin/44b9144faf2292e0e3ab to your computer and use it in GitHub Desktop.
Save t-sin/44b9144faf2292e0e3ab to your computer and use it in GitHub Desktop.
How to get a pathname of executable at run-time

How to get a pathname of executable at run-time in Common Lisp

It's NOT a load-time and compile-file-time pathname. It's equal to dirname $0 in shell scripting.

SBCL

(make-pathname :name nil :type nil
               :defaults sb-ext:*runtime-pathname*)

CCL

(truename (make-pathname :host "ccl"))

ECL

(truename (make-pathname :host "sys"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment