Re: [dev] environment variables versus runtime configuration (rc) files versus X resources

From: FRIGN <dev_AT_frign.de>
Date: Mon, 3 Nov 2014 20:45:37 +0100

On Mon, 03 Nov 2014 14:32:25 -0500
Greg Reagle <greg.reagle_AT_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 <dev_AT_frign.de>
Received on Mon Nov 03 2014 - 20:45:37 CET

This archive was generated by hypermail 2.3.0 : Mon Nov 03 2014 - 20:48:18 CET