lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi all!

Lately I've been struggling to force Lua interpreter to ignore LUA_INIT (on Windows). Since I hate to put shell invocation scripts everywhere (.cmd files, I mean) to set LUA_INIT to an empty value, I'd like to be able to invoke the interpreter like this:

lua --noinit myscript.lua

(I'm thinking to do the mod myself, but maybe this may be useful in general and may be worth adding to the standard distro).

Anyway, if someone has already a smart solution for this problem (i.e. that doesn't involve modifying the source), I'll be glad to have any pointer.

BTW, on a related note, I wonder whether options for bypassing LUA_PATH and LUA_CPATH would be useful too:

lua --path="c:\x\y\z\@.lua;c:\x\y\z\@\init.lua" myscript.lua

and a similar --cpath option for LUA_CPATH.

Of course I had to use @ instead of ? since ? is interpreted by the shell (so there will be the problem of escaping @ if @ appears in the actual path ...)

Cheers.
-- Lorenzo