Add BORG_LOCK_WAIT environment variable
To compliment the --lock-wait option?
could be done, you would need to give the option rather often without the env var?
Exactly. The way my code is written, we are already using environment variables for each command to set the passphrase and remote path. It would be cleanest to be able to include this setting in the environment vars.
Perhaps, the options system could be augmented to always look for an environment variable that matches one of the common options. So, lock-wait option automatically looks for a BORG_LOCK_WAIT environment variable for it's default value. Priority of option values would come from
- cli value
- environment value
- Borg default
That would solve the need for this specific option but give more flexibility for other options too.
Don't overengineer it. I see what you mean and it is basically ok, but no quick change to borg (and should not be home-grown either, but rather come from a library based on argparse doing that - it also relates to configurability and could also process a config file).
So for now, a simple PR to add that env var to code and docs would be welcome. master branch first, later backport to 1.1-maint.