nexuslua
|
The nexuslua function scriptdir returns the directory of the current Lua script (without its filename), appended with the platform-specific directory separator character. In case there is no associated Lua script, e.g. the code has been executed via switch -e, the functions returns the empty string.
print(scriptdir()) -- /home/stefan/luascripts