lua-users home
lua-l archive

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


> I can work around this with an extra
> level of script, but it means that I can't easily start Zile from a
> hash-bang script.

I often solve problems like this with a combined lua/sh script:

Like so:

  #!/bin/sh
  A=--[[ LUA_INIT= LUA_PATH= LUA_CPATH= exec lua "$0" "$@"  # -*- mode: lua; -*- ]]A
  print( "hello world" )

Note the /bin/sh in the shebang line.
And with -*- mode: lua; -*- even emacs gets it right.

   Jörg