Executable Extension with Lua

Jun 2, 2008
Newton, MA
Can someone tell me what I am doing wrong here? I defined an executable extension for LUA, but it doesn't seem to work. However, the very command line reported by WHICH runs just fine. Here is a series of commands:

tcmd>set .lua

tcmd>which test
test is an executable extension : lua C:\commands\lua\test.lua

Lua: C:\Program Files\JPSoft\TCMD16x64\TCC.EXE:1: syntax error near char(144)

tcmd>lua C:\commands\lua\test.lua
a b
I get the same (rather mysterious) error message here.
v:\> type test.lua

v:\> lua test.lua

v:\> set .lua=lua

v:\> test.lua
Lua: G:\TC16\TCC.EXE:1: syntax error near char(144)
Jun 2, 2008
Newton, MA
Why are you using an executable extension instead of the internal Lua support?
I thought that I was trying to use the internal Lua support to run a file with the name test.lua without having to type the lua command.

I just defined the environment variable .alias=alias /r and was able to execute the file test.alias to load the aliases defined in that file. So executable extensions are not limited to external commands. Shouldn't one be able to invoke lua to execute a file by extension?