diff --git a/docs/usage/general/environment.rst.inc b/docs/usage/general/environment.rst.inc index 10455252e..d684012ec 100644 --- a/docs/usage/general/environment.rst.inc +++ b/docs/usage/general/environment.rst.inc @@ -284,3 +284,29 @@ Please note: .. _INI: https://docs.python.org/3/library/logging.config.html#configuration-file-format .. _tempfile: https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir + + +Automatically generated Environment Variables (jsonargparse) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Borg uses jsonargparse_ with ``default_env=True``, which means that every +command-line option can also be set via an environment variable. + +The environment variable name is derived from the program name (``borg``), +the subcommand (if any), and the option name, all converted to uppercase +with dashes replaced by underscores. + +For **top-level options** (not specific to a subcommand), the pattern is:: + + BORG_