[pulseaudio-discuss] [PATCH 0/5] CLI meta commands

Peter Meerwald pmeerw at pmeerw.net
Tue May 5 03:33:29 PDT 2015


Hello Tanu,

> > patch 4 implements a new .ifenv CLI meta command I found useful: executes commands
> > only when an environment variable exists (optionally with a certain value)
> 
> Can you elaborate, what problem you solve with environment variables? Is
> there no reasonable alternative? Here is someone else's attempt at
> explaining why environment variables are not nice:
> http://peterlyons.com/problog/2010/02/environment-variables-considered-harmful

thanks for taking a look :)

I'm sure there are different ways of doing things...

I found it useful to conditionally load either module A or module B (or 
the same module with different parameters) in a sequence of modules that get 
loaded in a custom script.pa

I could have split up my script.pa into scriptA.pa and script.B and 
specify using pulseaudio's -F parameter, and use .include's to avoid 
duplication; or I could have scripted the PA commands elsewhere

I have no strong opinion about that added feature; I guess one cannot make 
the point that it is absolutely essential -- but the same thing can be 
said about PA's script in general

are you OK with the cleanups/fixes in patches 1 and 2?

regarding the links provided, I think that the usefulness of environment 
variable has passed the test of time and they are fundamental to many 
unix tools for a good reason; esp. sourcing a key/value file into 
env. vars. is really useful; I can manipulate an env. var. easily in a 
shell script, writing a particular config file format -- not so much

regards, p.

-- 

Peter Meerwald
+43-664-2444418 (mobile)


More information about the pulseaudio-discuss mailing list