lua-users home
lua-l archive

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

On Sat, Jul 12, 2014 at 8:42 AM, Xavier Wang <> wrote:
> Probably you could change the label to be one that's valid in both, and then
> put the Lua label immediately afterward:
> goto myLabel
> ::myLabel::
> print("Hello world")
> --[[
> :myLabel
> @echo "Hello shell!"
> ::]]
> --
> Sent from my Game Boy.

But it will print "goto myLabel" on cmd console, Is there any way to avoid it?

Xavier Wang.

It looks like that's a problem with the original method as well. I suppose you could use @goto and invoke the script with something crazy like:
lua -e "load([[" .. %0 .. "]]):read('*a'):gsub('@goto', 'goto'))()"

Sent from my Game Boy.