lua-users home
lua-l archive

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

It was thus said that the Great Russell Haley once stated:
> On Sun, May 6, 2018 at 5:43 PM, Sean Conner <> wrote:
> >   If you are going down this path, then plan to go all-out:  options can be
> > set by
> >
> >         command line, which overrides (or extends)
> >         environment variables, which overrides
> >         per-directory config file (example ./megalua.conf), which overrides
> >         per-user config file (example $HOME/.megalua), which overrides
> >         system-wide config file (example /etc/megalua), which overrides
> >         default setting in the program.
> >
> That's exactly what I was thinking but perhaps a slightly different order
> of override:
> - command line overides
> - local directory config file overrides
> - environment variables
> - user config file
> - global per interpreter file

  I would still put environmental over local directory, because you can
specify a temporary setting for an environment variable for running a

[spc]lucy:~>lua -e 'print(os.getenv "HOME")'
[spc]lucy:~>HOME=/tmp lua -e 'print(os.getenv "HOME")'
[spc]lucy:~>lua -e 'print(os.getenv "HOME")'