lua-users home
lua-l archive

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

Luiz Henrique de Figueiredo wrote:
> >It's common to invoke interpreters in this fashion:
> >
> >     #!/usr/bin/env python
> >
> >It doesn't seem that the lua command line interface was designed with
> >this in mind.  Could it be improved to work like other interpreters?
> How do other interpreters handle this? They don't have command-line options??

They have.  But they don't need them to execute a script.  They are called
like this:

  interpreter script [arguments]

> What do you suggest?

Remove the -f option and do its action on the first non-option argument.

Ciao, ET.

PS: Maybe you want to have a look at Sol's interpreter.  It does it right
and has (IMHO) some other useful stuff (-r [require], -I [path], atexit,
env-table, args for -e, ...).