2 ms·
> I don't know about others but I'm not a fan of monstrosity like this I think in that case bemenu is abusing env vars to just stuff CLI arguments in a single
by imiric 5y ago
> I don't know about others but I'm not a fan of monstrosity like this
I think in that case bemenu is abusing env vars to just stuff CLI arguments in a single one, so it defeats the benefit I mentioned above. It could be argued that having individual env vars for every option is cumbersome and pollutes the environment, but this is practically not a problem.
> If I stuff it into a wrapper script, I'm essentially trying to emulate config files, which is what should've been used in the first place.
Sure, but I see that as a positive. You don't have to worry about the many configuration file formats and their idiosincracies, where they're located and how they're passed to the application. Environment variables work across language stacks and platforms, are simple to implement and use.
> This is why I prefer using config files rather than creating uglier and harder to maintain wrapper scripts.
It's a matter of preference I guess, and I also don't use them for every app. In some cases they might be limiting, so a configuration file is the only option, but I appreciate whenever a program reads all configuration from the environment. It certainly simplifies a lot of things, e.g. running it in a container.