On Mon, 03 Nov 2014 14:32:25 -0500
Greg Reagle <greg.rea...@umbc.edu> wrote:

> It occurred to me that environment variables can be used to configure a
> program, instead of programming in a parser or extension language into a
> program.  Are there any reasons not to just use environment variables? 
> Then a rc file could just be a shell script that sets environment
> variables.  Do you know of any programs that do this?  I assume there
> are disadvantages, but what?

Not everyone runs his programs from a shell. Apart from that, there are
a bunch of security- and consistency-issues linked to that.
wine kinda pisses of with its hundreds of env-options, but just consider
having one set of commands for each little suckless tool around.

A central config.h and command line arguments are definitely enough.
If you still want to set according to env-vars, you might want to
define a var for each program and invoke it with "program $VARSET",
where $VARSET is the set of command-line-options you have set before.

Cheers

FRIGN

-- 
FRIGN <d...@frign.de>

Reply via email to