lua-users home
lua-l archive

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


On Tue, May 8, 2012 at 8:10 PM, Egor Skriptunoff
<egor.skriptunoff@gmail.com> wrote:
> Neither %~f0 nor "%~f0" works correctly if filespec contains spaces.

Ah, but we can always quote the argument - this version passes all
tests (works from paths-with-spaces, correct errorlevel)

::lua::--[[
@lua52.exe "%~f0" %* & @exit /b %errorlevel%
]]
print 'hello dolly'
for i,a in ipairs(arg) do print(i,a) end
os.exit(2)


steve d.